[Top][All Lists]

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

Re: Octave plot with multiple colors in one plt

From: Francesco Potortì
Subject: Re: Octave plot with multiple colors in one plt
Date: Fri, 25 Jul 2014 13:15:37 +0200

>I'm having quite a hard time getting the program to plot while rotating
>colors. I've used all the examples shown online and nothing seems to work.
>when i type "help colororder" on the browser, it says it is undefined;
>however, it will show when i type "get(gca,'colororder')). 
>My code is a one line sentence
>plot (t,deltaT,'c'). t and deltaT are 1 x 5002 dimension. The legend
>assigned to this plot may have 10 graphs in one plot or figure.
>leg = [leg;strcat('Max deltaT V', int2str(i),
>I want each of those plots to have different colors.
>Is there something i can do differently that hasn't been suggested?
>Any assistance will be greatly appreciated. 

I tried too, and cannot get that property to work.  This is what I do:

octave> plot([1:2]',[1:10;1:10]);

I get ten horizontal lines, the bottom one is blue, then green, then
red, the eighth line is blue again, as expected.

octave> set(gca,"colororder",flipud(get(gca,"colororder")));

This changes nothing.  Unexpected, but maybe I need ot do this *before*
the plot command?

octave> plot([1:2]',[1:10;1:10]);

Nothing changes :(

Trying to set the "colororder" property in the plot command itself
generates an error:

octave> plot([1:2]',[1:10;1:10],"colororder",rainbow(10));
error: get: unknown line property colororder

This is Octave 3.8.1 on Debian with the gnuplot toolkit.

Bottom line is: how does one ues the colororder property?

Francesco Potortì (ricercatore)        Voice:  +39.050.621.3058
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Skype:  wnlabisti
(entrance 20, 1st floor, room C71)     Web:

reply via email to

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