R2023b and Sonoma bugs

2 次查看(过去 30 天)
Alessandro
Alessandro 2024-3-27
Hi
I just switched to Sonoma OSX (updated) and R2023b (updated).
Apparently there are some things not right.
For example, prior to this update, this used to work fine to set all my figures to some papersize:
>> set(groot,'DefaultFigurePaperSize',[30 30])
>> figure
>> get(gcf,'papersize')
ans =
8.2677 11.6929
Other properties, such as set(groot,'DefaultFigureColormap',summer), work fine
Any help?
thanks

回答(2 个)

Piyush Kumar
Piyush Kumar 2024-4-25
Hi,
One of the reasons might be that you have set the "papertype" of the current figure to 'a4'. As a workaround, try setting the "papersize" with gcf.
set(gcf,'papertype','a4')
get(gcf,'papersize')
set(groot,'DefaultFigurePaperSize',[30 30])
figure
get(gcf,'papersize')
set(gcf,'papersize',[30 30])
get(gcf,'papersize')
Hope this helps!

Brian Knolhoff
Brian Knolhoff 2024-5-2
Another way to do this is that you can set the DefaultFigurePaperType to '<custom>' and then it will pick up the DefaultFigurePaperSize. For example:
set(groot,'DefaultFigurePaperSize',[30 30]);
set(groot,'DefaultFigurePaperType','<custom>');
f = figure;
get(gcf,'papersize') % returns [30 30]
This will avoid the need to always set the 'papersize' property on gcf, as coded above.

类别

Help CenterFile Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by