How to plot multiple data sets on the same graph

조회 수: 2 (최근 30일)
Aamna Sami
Aamna Sami 2017년 12월 9일
댓글: Aamna Sami 2017년 12월 12일
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-');

채택된 답변

Birdman
Birdman 2017년 12월 9일
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
Birdman
Birdman 2017년 12월 9일
Can you accept the answer so that other people having the same problem will know there is a working solution.
Aamna Sami
Aamna Sami 2017년 12월 12일
Sure:) Thanks again for your prompt responses!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by