How to plot solid and dashed lines?
Ältere Kommentare anzeigen
I want to plot a graph with a dashed and a solid line. Therefore, I use the script "subplot(221); spm1d.plot.plot_meanSD(Y0, 'color','k','--'); hold on ; spm1d.plot.plot_meanSD(Y1, 'color','r','-');"
However, I always get the following error: "Error using spm1d.plot.plot_meanSD (line 12) '--' is not a recognized parameter".
How can I plot it correctly?
3 Kommentare
darova
am 24 Dez. 2019
try
plot(x,y,'--k')
J. Alex Lee
am 24 Dez. 2019
or to more closely align with original attempts
plot(x,y,'Color','k','LineStyle','--')
so "LineStyle" is the parameter you want to have the value "--"
Image Analyst
am 24 Dez. 2019
Bearbeitet: Image Analyst
am 24 Dez. 2019
Can you transfer your "Comments" to the official "Answers" section down below? You'll be able to earn reputation points down there, but not if they're just up here as a Comment (usually meant for asking for more clarification from the original poster).
Akzeptierte Antwort
Weitere Antworten (1)
Nikita
am 24 Dez. 2024
0 Stimmen
plot(x,y,"--")
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!