フィルターのクリア

Combine 2 plots into a single figure

1 回表示 (過去 30 日間)
SreeHarish Muppirisetty
SreeHarish Muppirisetty 2013 年 12 月 12 日
回答済み: Suneesh 2013 年 12 月 12 日
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 Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by