MATLAB Answers

0

How to plot data of 3 columns with different line style.

i am supposed to plot the data plot(EX_1(1:100,1:3),'k-'). with this I get 3 plots with same black solid style. But i need different colours. any answer. thanks in advance

  0 Comments

Sign in to comment.

Tags

Products

1 Answer

Answer by José-Luis
on 21 Aug 2017
Edited by José-Luis
on 21 Aug 2017
 Accepted Answer

Best to do it explicitly for each line, but if you want automagic:
set(groot,'defaultAxesColorOrder',[0,0,0],'defaultAxesLineStyleOrder','-|:|--');
plot(rand(10,3))

  3 Comments

I am getting error 'Undefined function or variable 'groot''
If you are in an archaic version of Matlab use
set( 0,... )
instead

Sign in to comment.