[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Plotting with automatic colours & markers
From: |
John W. Eaton |
Subject: |
Plotting with automatic colours & markers |
Date: |
Thu, 17 Jan 2008 00:58:55 -0500 |
On 17-Jan-2008, Etienne Le Sueur wrote:
| I'm using octave 3.0.0 on Mac OSX, with gnuplot 4.2.
|
| I have a set of data which produces a plot with about 12 lines.
| unfortunately, because there are a limited amount of colours, the
| colours are repeated, and there is no way to determine which line in the
| legend corresponds to which plotted line.
|
| Is there any way to have the plot function automatically handle this? or
| can anyone post an example of how to do it manually?
|
| I am calling the plot function once with a matrix of values
| corresponding to each line.
Try something like this:
colors = sort (rand (12, 3)); ## 12 RGB colors
set (gca (), "colororder", colors);
plot ([zeros(1,12); ones(1,12)], [zeros(1,12); 1:12]);
Or, to make this set of colors the default for all plots:
set (0, "defaultaxescolororder", colors);
jwe