More plotting colors??

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

More plotting colors??

injoi
I am plotting multiple data traces and I need them all to be on one graph so I can easily compare but I need more colors to tell what is what.

Is there a way to plot more than the 6 given colors?
Windows 7, intel Xeon(R) 3.3GHz

Thanks, Nohtal
Reply | Threaded
Open this post in threaded view
|

Re: More plotting colors??

marco atzeri-2
On 10/11/2012 2:30 AM, injoi wrote:
> I am plotting multiple data traces and I need them all to be on one graph so
> I can easily compare but I need more colors to tell what is what.
>
> Is there a way to plot more than the 6 given colors?
>
>

Function File: plot (x, y, property, value, ...)

http://www.gnu.org/software/octave/doc/interpreter/Line-Properties.html#Line-Properties

use color in RGB format
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: More plotting colors??

Juan Pablo Carbajal
On Thu, Oct 11, 2012 at 5:55 AM, marco atzeri <[hidden email]> wrote:

> On 10/11/2012 2:30 AM, injoi wrote:
>>
>> I am plotting multiple data traces and I need them all to be on one graph
>> so
>> I can easily compare but I need more colors to tell what is what.
>>
>> Is there a way to plot more than the 6 given colors?
>>
>>
>
> Function File: plot (x, y, property, value, ...)
>
> http://www.gnu.org/software/octave/doc/interpreter/Line-Properties.html#Line-Properties
>
> use color in RGB format
>
> _______________________________________________
> Help-octave mailing list
> [hidden email]
> https://mailman.cae.wisc.edu/listinfo/help-octave

Another solution if you do not want to create your own colors.

Octave has many colormaps defined (also you can get real2rgb package
from matlab exchange file) and you can use them to generate palettes
for your plots.
Example:
Let say you have N different datsets you want to plot, each one with a
line of a different color. Let say you have a vector t (kx1) and the
datasets in a matrix data (kxN).
You plot them

h = plot(t,data,"-")

Then you create and assign your palette

palette = jet (N);
for i =1:N
set(h(i),"color",palette(i,:))
end


Cheers

--
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Z├╝rich
http://ailab.ifi.uzh.ch/carbajal/
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: More plotting colors??

andy buckle
In reply to this post by injoi
On 11 October 2012 01:30, injoi <[hidden email]> wrote:

> I am plotting multiple data traces and I need them all to be on one graph so
> I can easily compare but I need more colors to tell what is what.
>
> Is there a way to plot more than the 6 given colors?
>
>
>
> -----
> Windows 7, intel Xeon(R) 3.3GHz
>
> Thanks, Nohtal

red=1; green=0; blue=0.8;
plot([0 1],[0 1],'color',[red green blue])

--
/* andy buckle */
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave