MATLAB: Plotyy two variables one with two series

plotyy question

Hi All, Please is it possible to use plotyy to plot two variables, temperature and speed, but for the speed coordinate I need to plot two series u and v. If it is possible, please how to do this.

Best Answer

Dear Abdulaziz, yes you can plot it. The following is an illustration of it:
temparature = 1:100;
u = rand(1, 100);
v = rand(1, 100);
plotyy(temparature, u, temparature, v), legend('u plot', 'v plot')
I hope it helps. Good luck!