Re: Plotting cells on one graph with different colors



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?

.



Relevant Pages

  • Re: Plotting cells on one graph with different colors
    ... of a column vector of data on one graph, in which each line on the ... The PLOT command, if no color is specified, makes automatic use of ... the colors specified by the axes ColorOrder property. ... PLOT cycles over the axes LineStyleOrder property. ...
    (comp.soft-sys.matlab)
  • Re: Plotting cells on one graph with different colors
    ... of a column vector of data on one graph, in which each line on the ... The PLOT command, if no color is specified, makes automatic use of ... the colors specified by the axes ColorOrder property. ...
    (comp.soft-sys.matlab)
  • Plotting cells on one graph with different colors
    ... 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 ...
    (comp.soft-sys.matlab)
  • Re: [opensuse] Lies, damned lies and statistics
    ... Recently we have done a poll around the office. ... line with bash/sed/awk and then produce graphs from that, then spline, graph ... GNU 'plot' is then called to display a graph on the screen: ...
    (SuSE)
  • Help needed in ploting graphs in GUI
    ... I am trying to make a graph in the GUI which plots itself ... when the user pushes a pushbutton. ... plot the current data as well as the previous data. ...
    (comp.soft-sys.matlab)