How can I combine two existing figures in one?
1 回表示 (過去 30 日間)
古いコメントを表示
Hello all, I have two figures with a surface plotted in each one.The figures have the same axes, titles,.... How can I have these two together in one figure?
2 件のコメント
Akira Agata
2017 年 9 月 22 日
Do you mean you want to make 'subplot' figure ?, or want to plot two surfaces in a same axes ?
採用された回答
Akira Agata
2017 年 9 月 22 日
Nilou-san,
Thanks for giving me the detail. OK, the following is sample code for plotting your two plots in the same axes. I hope this will be helpful for you!
rng('default'); % for reproducibility
x = sort(rand(10,1));
y = sort(rand(10,1));
z = sort(rand(10,1));
f1 = fit( [x, y], z, 'poly23' );
f2 = fit( [x, y], z, 'poly23' );
figure
plot(f1, [x, y], z);
hold on;
plot(f2, [x, y],z,'style','contour');
xlabel('x');
ylabel('y');
zlabel('response');
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!