Re: Plotting cells on one graph with different colors
- From: jp <jpopovich@xxxxxxxxx>
- Date: 31 Oct 2007 15:00:28 -0700
On Oct 30, 8:27 pm, rober...@xxxxxxxxxxxxxxxxxx (Walter Roberson)
wrote:
In article <1193799602.498914.263...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
jp <jpopov...@xxxxxxxxx> wrote:
Is there a way to plot a 5x1 cell where each row of the cell consists
of a column vector of data on one graph, in which each line on the
graph will be different colors? I was going to run something like
this:
hold on
plot(data{1}, 'r');
plot(data{2}, 'm');
plot(data{3}, 'c');
plot(data{4}, 'b');
plot(data{5}, 'k);
Are all the cell entries the same size? e.g.,
plot(1:length(data{1}), vertcat(data{:}))
together with the axes ColorOrder ?
help plot
The PLOT command, if no color is specified, makes automatic use of
the colors specified by the axes ColorOrder property. The default
ColorOrder is listed in the table above for color systems where the
default is blue for one line, and for multiple lines, to cycle
through the first six colors in the table. For monochrome systems,
PLOT cycles over the axes LineStyleOrder property.
--
"Okay, buzzwords only. Two syllables, tops." -- Laurie Anderson
Thank you very much...In this case they were the same length, but they
were column vectors within the cell, so I replaced vertcat with
horzcat and it worked great. Could something similar have been done
if they were different lengths?
.
- References:
- Plotting cells on one graph with different colors
- From: jp
- Re: Plotting cells on one graph with different colors
- From: Walter Roberson
- Plotting cells on one graph with different colors
- Prev by Date: Re: Profiling Java in Matlab
- Next by Date: nested functions
- Previous by thread: Re: Plotting cells on one graph with different colors
- Next by thread: find for cell structure
- Index(es):
Relevant Pages
|