Copying handle.axes to figure in Matlab GUI

1 回表示 (過去 30 日間)
Elena Martín
Elena Martín 2019 年 5 月 10 日
コメント済み: Elena Martín 2019 年 5 月 25 日
Hi everyone!
I have done a gui where i have set in three different handles.axes a head model. I want to copy in a figure the handle.axes corresponding to the first figure statring from the left. I have done this code:
Figure3 = figure('Visible','on'); % Invisible figure
newAxes = copyobj(handles.axes9,Figure3); %
But, when the axes is copied it keeps the same position and I would like the figure to be in the center of the figure but I cant figure out how to do it. I have attached the result I get. If anyone could help me it would be great!
Thanks in advance! ExampleGUI.png

採用された回答

Pruthvi Muppavarapu
Pruthvi Muppavarapu 2019 年 5 月 13 日
Hi Elena,
You could try changing the "Position" Property of the axes in order to center your plot. Feel free to refer to the following document, which defines axes properties in detail:
Mention the position cordinates according to the requirments, i.e. in order to do horizontal centering, the 'left' and 'width' can be set in accordance with the following equation:
2*left + width = 1
Similarly, for the vertical centering, the 'bottom' and 'height' can be set in the same way.
Hope this helps.
Regards,
Pruthvi
  1 件のコメント
Elena Martín
Elena Martín 2019 年 5 月 25 日
Thank you very much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpecifying Target for Graphics Output についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by