Recently updated to Matlab 2014b, now figures default to plotting off screen, axes dimensions are wrong

1 view (last 30 days)
Hello,
Sorry if I'm asking in the wrong spot, but I recently updated from 2012a to 2014b, and now I'm starting to experience a whole bunch of problems with my plots. As the title says, it's defaulting to plotting all my figures offscreen, which in itself isn't a huge problem but it's also making the window incredibly large, but the axes are basically not viewable at all. I believe this is related to the code I have running in my start up
set(0,'DefaultFigurePaperPositionMode','auto');
set(0,'DefaultFigureUnits','inches');
set(0,'DefaultFigurePaperUnits','inches');
set(0,'DefaultAxesUnits','inches');
I can disable this code, and then the figures will plot up on screen and at normal sizes, but I have the start up set this way so that the plots won't resize if I resize my window and was really hoping to not change that.
Now I can set the DefaultFigurePosition in my start up so it fixes part of the issue, but what I'm really having trouble with is setting the default axes so that it doesn't make the figure impossible to view. Here's a link to an image of what the figure ends up looking like.
I was wondering if anyone had any advice for something I could add to my start up that would help fix this issue. Thank you in advance to anyone who takes the time to reply.
-Phil
  2 Comments
Rich Ohman
Rich Ohman on 8 Apr 2015
The issue with the Axes position is a bug in R2014b and is fixed in R2015a.
For now, you could try setting both the Figure and Axes default positions to what they would be for the inches conversion:
set(0,'defaultFigurePosition', [7.0729 7.0521 5.8333 4.3750]);
set(0,'defaultAxesPosition', [0.7583 0.4813 4.5208 3.5656]);
set(0,'DefaultFigurePaperPositionMode','auto');
set(0,'DefaultFigureUnits','inches');
set(0,'DefaultFigurePaperUnits','inches');
set(0,'DefaultAxesUnits','inches');
-Rich
Adam
Adam on 8 Apr 2015
I don't think it will make any difference at all to the behaviour you are seeing, but you should use e.g.
set( groot, 'defaultFigurePosition',...)
from R2014b rather than
set( 0, 'defaultFigurePosition',... )

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!