Main Content

Axes Appearance

Modify axis limits and tick values, add grid lines, combine multiple plots

You can customize axes by changing the limits, controlling the locations of the tick marks, formatting the tick labels, or adding grid lines. You also can combine multiple plots, either using separate axes in the same figure, or by combining the plots in the same axes, with the option to add a second y-axis.


expand all

xlimSet or query x-axis limits
ylimSet or query y-axis limits
zlimSet or query z-axis limits
axisSet axis limits and aspect ratios
boxDisplay axes outline
tightPositionPosition of axes plotting area
daspectControl data unit length along each axis
pbaspectControl relative lengths of each axis
gridDisplay or hide axes grid lines
xticksSet or query x-axis tick values
yticksSet or query y-axis tick values
zticksSet or query z-axis tick values
xticklabelsSet or query x-axis tick labels
yticklabelsSet or query y-axis tick labels
zticklabelsSet or query z-axis tick labels
xtickformatSpecify x-axis tick label format
ytickformatSpecify y-axis tick label format
ztickformatSpecify z-axis tick label format
xtickangleRotate x-axis tick labels
ytickangleRotate y-axis tick labels
ztickangleRotate z-axis tick labels
datetickDate formatted tick labels
ruler2numConvert data from specific ruler to numeric data
num2rulerConvert numeric data for use with specific ruler

Combining Plots

holdRetain current plot when adding new plots
yyaxisCreate chart with two y-axes
legendAdd legend to axes
colororderSet color order for visualizing multiple data series

Tiling Plots

tiledlayoutCreate tiled chart layout
nexttileCreate axes in tiled chart layout
tilenumTile location numbers in tiled chart layout
tilerowcolRow and column numbers in tiled chart layout
subplotCreate axes in tiled positions
claClear axes
axesCreate Cartesian axes
figureCreate figure window


Axes Properties Axes appearance and behavior
Legend PropertiesLegend appearance and behavior
TiledChartLayout PropertiesTiled chart layout appearance and behavior


Limits, Ticks, and Grids

Multiple Plots

Size and Aspect Ratio