using subplot

I want to use subplot to plot some figure with the same x-axis range and i dont want to have separated. I want to plot it closely together by using a single a-axis.

1 个评论

Afeez
Afeez 2011-7-2
I dont mean to plot all the data on a single plot, i actually need to put them (3 plots) one on top of the other and use the same a-axis but different y-axis

请先登录,再进行评论。

回答(1 个)

Then it's not subplot. Just use plot() with the hold on command.
t=1:0.1:10;
plot(t,0.1*t);
hold on;
plot(t,sin(t));

2 个评论

Afeez
Afeez 2011-7-2
Thank you Jiang, i dont mean to plot all the data on a single plot, i actually need to put them (3 plots) one on top of the other and use the same a-axis but different y-axis;
Then, plotyy() can provide 2 y-axis on the left and right.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Two y-axis 的更多信息

标签

提问:

2011-7-2

Community Treasure Hunt

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

Start Hunting!

Translated by