How to set default figure size?

98 次查看(过去 30 天)
Sungwoo Park
Sungwoo Park 2017-7-18
编辑: Sargondjani 2024-11-23
The default figure sizes of different computers are different. Therefore,
1) I want to know the default figure size of one of the computers.
2) And I want to set the same figure size as a default for other computers.
Many thanks in advance!

回答(1 个)

the cyclist
the cyclist 2017-7-18
编辑:the cyclist 2017-7-18
get(0,'defaultfigureposition')
Then set the figure position to whatever you want using the equivalent set() command.
See more details in the documentation about default property values.
  5 个评论
Antonio Astorino
Antonio Astorino 2017-11-4
Hi Sungwoo! I am experiencing a similar problem. Have you solved yours? If you did, could you please share your solution? Thanks a lot.
Best regards,
Antonio.
Sargondjani
Sargondjani 2024-11-23
编辑:Sargondjani 2024-11-23
For future reference: you can always save a figure first in a certain format. There are the options to use saveas, print, exportgraphics:
saveas(figname,'filename','fig'); %example with matlab "figure"
print(figname,'filename', '-dpng')%example with png format
exportgraphics(figname,'filename.eps')%example with eps format
I think the last one is the preferred function.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Printing and Saving 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by