Copying axes into Figure only copies the half of the actual plot.
3 ビュー (過去 30 日間)
古いコメントを表示
Luis Garcia Maldonado
2020 年 6 月 29 日
コメント済み: Luis Garcia Maldonado
2020 年 6 月 29 日
I'm trying to copy the plot from my GUI axes into another figure then saving it as a JPEG file, but the copying of the object only copies half way of the plot.
See image attached. (Left is the copied plot from axes1 in GUI, right is the axes1 in the actual GUI.
Here is the code I'm using to copy the objects.
plot1name = ['Plot1' '.jpeg'];
h = findobj(gcf,'type','axes');
fig1 = figure('Visible','on');
newAxe1 = copyobj(h,fig1);
saveas(fig1,plot1name);
2 件のコメント
Voss
2020 年 6 月 29 日
The GUI figure is bigger (in particular, taller) than Figure 1, so that may be the reason. It depends on the Units and Position properties of the axes.
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Visual Exploration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!