MATLAB Answers

Orongo
0

Plot using same colors

Asked by Orongo
on 14 May 2019
Latest activity Answered by Kevin Phung on 14 May 2019
Hi, I am plotting 100 lines in one plot and am zooming in on 10 of them (final 10 in a matrix). How can write so the 10 lines I zoom in on are of same colors in boths plots?

  0 Comments

Sign in to comment.

Tags

1 Answer

Answer by Kevin Phung on 14 May 2019

To plot in a specific color, scroll down in :
so you can do something like
col = [1 0 0] %RGB triplet,
a= plot(1:5,1:5,'Color',col)
%or
b= plot(1:5,1:5,'Color','r') % r for red
%you can set both lines to a different color at once:
set([a b],'Color','b');
^just apply this logic to the 10 plots you are talking about.

  0 Comments

Sign in to comment.