MATLAB: Plot Line Style Error Message

MATLAB

I tried
plot(x,y,'--','blue')
with valid data x and y (that I can plot without these options) and got an error message of "invalid data argument." Please advise.

Best Answer

  • Option 1
    plot(x,y,'b--')
    option 2
    plot(x,y,'--','color','blue') % or 'b', or [0 0 1]