This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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.


xlim Set or query x-axis limits
ylim Set or query y-axis limits
zlim Set or query z-axis limits
axis Set axis limits and aspect ratios
box Display axes outline
daspect Control data unit length along each axis
pbaspect Control relative lengths of each axis
grid Display or hide axes grid lines
xticks Set or query x-axis tick values
yticks Set or query y-axis tick values
zticks Set or query z-axis tick values
xticklabels Set or query x-axis tick labels
yticklabels Set or query y-axis tick labels
zticklabels Set or query z-axis tick labels
xtickformat Specify x-axis tick label format
ytickformat Specify y-axis tick label format
ztickformat Specify z-axis tick label format
xtickangle Rotate x-axis tick labels
ytickangle Rotate y-axis tick labels
ztickangle Rotate z-axis tick labels
datetick Date formatted tick labels
ruler2num Convert data from specific ruler to numeric data
num2ruler Convert numeric data for use with specific ruler
hold Retain current plot when adding new plots
subplot Create axes in tiled positions
yyaxis Create chart with two y-axes
cla Clear axes
axes Create Cartesian axes
figure Create figure window


Axes Properties Control axes appearance and behavior


Specify Axis Limits

Control where data appears in the axes by setting the axis limits.

Specify Axis Tick Values and Labels

Customize the tick values and labels along an axis, such as editing the tick value placement or modifying the tick label text and formatting.

Add Grid Lines and Edit Placement

Add grid lines to a graph and modify their placement and appearance.

Combine Multiple Plots

Show multiple plots together in the same figure, either by combining the plots in the same axes or by creating subplots.

Create Chart with Two y-Axes

Create a chart with y-axes on both the left and right sides.

Modify Properties of Charts with Two y-Axes

Modify charts with two y-axes by setting axes properties or by accessing the underlying ruler objects.

Create Chart with Multiple x-Axes and y-Axes

Create a graph with two x-axes and two y-axes by overlaying two separate Axes objects.

Control Ratio of Axis Lengths and Data Unit Lengths

Control the axis and data unit lengths by setting the plot box aspect ratio and the data aspect ratio.

Control Axes Layout

Set axes properties to control the axes size and position, the layout of titles and labels, and the axes resize behavior.

Was this topic helpful?