MATLAB: How to plot multiple data sets on the same graph

multiple variableplot

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-');

Best Answer

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-')