主要内容

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 secondy-axis.

Functions

expand all

xlim Set or queryx-axis limits
ylim Set or queryy-axis limits
zlim Set or queryz-axis limits
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 queryx-axis tick values
yticks Set or queryy-axis tick values
zticks Set or queryz-axis tick values
xticklabels Set or queryx-axis tick labels
yticklabels Set or queryy-axis tick labels
zticklabels Set or queryz-axis tick labels
xtickformat Specifyx-axis tick label format
ytickformat Specifyy-axis tick label format
ztickformat Specifyz-axis tick label format
xtickangle Rotatex-axis tick labels
ytickangle Rotatey-axis tick labels
ztickangle Rotatez-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

Combining Plots

hold Retain current plot when adding new plots
yyaxis Create chart with two y-axes
传说 Add legend to axes
colororder Set color order for visualizing multiple data series

Tiling Plots

tiledlayout Create tiled chart layout
nexttile Create axes in tiled chart layout
subplot Create axes in tiled positions
cla Clear axes
axes Create Cartesian axes
figure Create figure window

Properties

Axes Properties Axes appearance and behavior
Legend Properties Legend appearance and behavior
TiledChartLayout Properties Tiled chart layout appearance and behavior

Topics

Limits, Ticks, and Grids

Multiple Plots

Size and Aspect Ratio