matlab - Format each line in plot(x,y) where x is a matrix -


I want to format each row in a plot so that I can choose the color given for each row. Although my x values ​​are in matrix form so i can not use the plot (x, y, 'b', x, y, 'r', ...) style format thanks a lot.

I would recommend doing it in a loop, but there is probably another way to do this.

Define your colors in a matrix

  cmap = hsv (10)% ii = 1: 10 plot (x (ii,), y (ii,: ), 'Color', Semep (ii, :)) end  

create cmap , as you like, though it is a nlines x 3 should be of size.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -