필터 지우기
필터 지우기

R2023b and Sonoma bugs

조회 수: 2 (최근 30일)
Alessandro
Alessandro 2024년 3월 27일
답변: Brian Knolhoff 2024년 5월 2일
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