Question: subplot axes label cut off (activepositionproperty problem?)
이전 댓글 표시
Hi! I want to make a subplot such that two plots are side by side. The resulting figure needs to be small enough to fit in my document, and in the eps format. However, when I try to resize the figure past a certain size, the axes x labels are cut off like so :

this only happens when you resize it small enough. Also, it doesn't happen with the 'plot' command, I can resize as much as i like and the axes labels are maintained in the figure. My understanding is that activepositionproperty governs this sort of thing, and that it should be set to 'outerposition', but I've tried forcing that and it doesn't have any effect. Also, it doesn't seem to matter if you manually set the papersize and paperposition and then export, or whether you change the figure size using WYSIWYG on screen and then exporting. Would be grateful for any ideas to work around or fix this problem! I'm sure it didn't used to happen on earlier versions of matlab
댓글 수: 3
Jan
2012년 2월 21일
"Earlier versions of Matlab" than which version?
Please post what you have done exactly with the PaperPosition and the OuterPosition. These details are important and actually the should solve the problem. Therefore it is necessary to understand, what you have tried already.
Paul B
2012년 2월 21일
Paul B
2012년 2월 21일
채택된 답변
추가 답변 (4개)
William Thielicke
2020년 11월 24일
5 개 추천
So this bug still hasn't been fixed...? After 8.5 years...?
Shep Bryan
2021년 1월 29일
I have found a pretty decent work around. When you make your xlabel, add an extra blank line like this:
xlabel({'my label', ''})
That way the extra line gets cut off, but the real label is preserved.
Petr Chernikov
2021년 4월 21일
3 개 추천
@matlab-team, don't worry, we will wait another 10 years.
댓글 수: 1
William Thielicke
2021년 4월 21일
Yes, who needs labels anyways!
Yavor Dobrev
2021년 8월 3일
1 개 추천
Since R2020a there is a property, which solves this problem. Setting PositionConstraint to outerposition solved it for me. See https://de.mathworks.com/help/matlab/creating_plots/automatic-axes-resize.html
카테고리
도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!