R2015b - Axis labels cut off on small figures
6 views (last 30 days)
Show older comments
Whenever I resize my figures to make them small (say 400 px wide by 250 px tall), the X-axis label (not tick marks) gets cut off i.e. it's pushed off the bottom of the figure. My expectation is that resizing the figure would shrink the grid area once the axis label hit the bottom of the figure.
I've been fighting this for hours, and as far as I can determine this is a bug. There are MANY questions about this and none of the "solutions" give the result expected based on these instructions: http://www.mathworks.com/help/matlab/creating_plots/automatic-axes-resize.html According to the documentation, I should be able to set the "ActivePositionProperty" to 'outerposition' and have it resize based on the bounding box that includes the axis labels. Unfortunately, this property does not stick!
If I resize the figure to the desired size (axis label now cut off), then try to set the "ActivePositionProperty" to 'outerposition', nothing happens to the figure even though I can query the property and see that it has been set. I've tried setting the property to both gca and through drilling down into a handle to the figure i.e. fig1.CurrentAxes.ActivePositionProperty='outerposition'.
So I try a different way: size the figure to where everything fits, set the "ActivePositionProperty" to 'outerposition', then resize the figure. As soon as the figure changes size, "ActivePositionProperty" changes back to 'position'! Bottom line: I need the figure to resize the axes so that the labels fit, and following the documentation is NOT working!
0 Comments
Answers (0)
See Also
Categories
Find more on Axis Labels in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!