help-octave
[Top][All Lists]
Advanced

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

Re: More plotting colors??


From: Juan Pablo Carbajal
Subject: Re: More plotting colors??
Date: Thu, 11 Oct 2012 08:31:49 +0200

On Thu, Oct 11, 2012 at 5:55 AM, marco atzeri <address@hidden> 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
> address@hidden
> 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/


reply via email to

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