help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing the color of curves continuously


From: Quentin Spencer
Subject: Re: changing the color of curves continuously
Date: Wed, 27 Jul 2005 14:52:29 -0500
User-agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)

Julien Tailleur wrote:

Robert A. Macy a écrit :
More colors than that.

try this...


x=randn(50,16);plot(x);
you will see a wide range of colors

Hi,

I am sorry, I was not clear enough. What I have is a series of data's files

toto.02.txt
toto.04.txt
...
toto.50.txt
...
toto.96.txt
toto.98.tx

Each of these file corresponds to a two dimensional curves. I would like
to plot all these curves on the same plot, associating a specific color
for each file in the following way

02 -> yellow
50 -> orange
98 -> red

and varying continuously in between. If I could specify the color of a
curves using Red Green Blue system, it would be perfect (and I know it
is possible with Matlab), but I don't manage to do it.

Thanks a lot for your answers

So, you want to specify the line color using an exact RGB value? I looked at doing this once, and I think gnuplot doesn't have this capability. If you read the man page for gnuplot, it says you can change the default colors by setting the X resources at startup using a .gnuplot file or command-line switches with things like this:
gnuplot*line1Color: red

The problem is I think it still only recognizes 8 colors. There is a "palette" line style in 3-D mode, but I don't know if it would help you. For an example, go into gnuplot and try the command:
splot x*x with line palette

I'd really like to see the mesh function switch to using this line style--it's closer to what Matlab does. For a 2-D plot with more control over line colors, I think you may need to look at some of the alternate graphics modules that others have proposed.

-Quentin



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]