x = 1:3;y = [1 2 3; 42 40 34];plot(x,y,'Color', [0.5 0.5 0.5; 1 0 0])
produce an error:
Error using plotColor value must be a 3 element numeric vector
Same with:
plot(x,y,'rg')Error using plotError in color/linetype argument
This has bugged me for years, but I have circumvented it by unrolling the matrix into a number of vectors that I plot one at a time using whatever color I prefer. But is there no way to tell MATLAB (in a compact, readable form) what colors I would like it to use for whatever number of lines it will plot?
Best Answer