How to plot multiple data sets on the same graph

2 vues (au cours des 30 derniers jours)
Aamna Sami
Aamna Sami le 9 Déc 2017
Commenté : Aamna Sami le 12 Déc 2017
The following coding is only plotting the first two variables on the plot.
plot(years,run_rate,'r-s',years,CL,'g-',years,UCL,'g-',years,LCL,'g-');

Réponse acceptée

Birdman
Birdman le 9 Déc 2017
Use hold on command between. For instance:
plot(years,run_rate,'r-s');hold on;plot(years,CL,'g-');hold on;plot(years,UCL,'g-');hold on;plot(years,LCL,'g-')
  5 commentaires
Birdman
Birdman le 9 Déc 2017
Can you accept the answer so that other people having the same problem will know there is a working solution.
Aamna Sami
Aamna Sami le 12 Déc 2017
Sure:) Thanks again for your prompt responses!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by