Combine 2 plots into a single figure

1 次查看(过去 30 天)
Can I combine two plots into a single figure. Assuming that my Xticks for:
Plot1 would be 0 1 2 3 4 5 6 7 8 9 10 and for
Plot2 they would be 10 1000 2000 3000 4000 5000.
I want Plot3 a combined figure of Plot 1 & 2 with Xticks arranged finally as
1 2 3 4 5 6 7 8 9 10 1000 2000 3000 4000 5000.
Thanks for your time

回答(1 个)

Suneesh
Suneesh 2013-12-12
One way to do this is by manipulating the XData and YData properties. Try:
figure; h1 = plot(1:10);
figure; h2 = plot(10:10:50,20:24);
set(h1,'XData',[get(h1,'XData') get(h2,'XData')], 'YData', [get(h1,'YData') get(h2,'YData')])

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by