Printing and Exporting Figures with MATLAB | ![]() ![]() |
Locking the Ticks and Limits of the Axes
MATLAB may rescale the ticks and limits of your axes when you print or export your figure. This section shows you how to lock them so that they are the same as they were when displayed.
Default Behavior
The MATLAB default output size, 8-by-6 inches, is normally larger than the screen size. If the size of your printed or exported figure is different from its size on the screen, MATLAB scales the number and placement of axes tick marks to suit the output size. For example, if your printed or exported figure is larger than it is on the screen, MATLAB increases the resolution of the axes.
How to Lock the Ticks and Limits
To lock the axes ticks and limits on a per figure basis, use one of the following:
manual
.
To lock the axes ticks and limits for all sessions, include the following line in your startup.m
file:
set(0, DefaultAxesXTickMode, 'manual', DefaultAxesYTickMode, 'manual', 'DefaultAxesZTickMode', 'manual');
Using the XTickMode, YTickMode, and ZTickMode Properties
Set the XTickMode, YTickMode, and ZTickMode properties to manual
.
![]() | Retaining Background Colors | Adjusting Lines and Text for Printing | ![]() |