Axes Appearance - MATLAB & Simulink - MathWorks Benelux (2025)

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.

Functions

expand all

Limits

xlimSet or query x-axis limits
ylimSet or query y-axis limits
zlimSet or query z-axis limits

Scale

xscaleSet or query x-axis scale (linear or logarithmic) (Since R2023b)
yscaleSet or query y-axis scale (linear or logarithmic) (Since R2023b)
zscaleSet or query z-axis scale (linear or logarithmic) (Since R2023b)

Plot Box and Aspect Ratio

boxDisplay axes outline
tightPositionPosition of axes plotting area (Since R2022b)
axisSet axis limits and aspect ratios
daspectControl data unit length along each axis
pbaspectControl relative lengths of each axis

Tick Values

xticksSet or query x-axis tick values
yticksSet or query y-axis tick values
zticksSet or query z-axis tick values
xtickformatSpecify x-axis tick label format
ytickformatSpecify y-axis tick label format
ztickformatSpecify z-axis tick label format
ruler2numConvert data from specific ruler to numeric data
num2rulerConvert numeric data for use with specific ruler

Grid Lines and Tick Marks

gridDisplay or hide axes grid lines
xtickangleRotate x-axis tick labels
ytickangleRotate y-axis tick labels
ztickangleRotate z-axis tick labels

Labels

xticklabelsSet or query x-axis tick labels
yticklabelsSet or query y-axis tick labels
zticklabelsSet or query z-axis tick labels
xsecondarylabelSet x-axis secondary label (Since R2023b)
ysecondarylabelSet y-axis secondary label (Since R2023b)
zsecondarylabelSet z-axis secondary label (Since R2023b)

Combining Plots

holdRetain current plot when adding new plots
yyaxisCreate chart with two y-axes
legendAdd legend to axes

Customizing Multiple Data Series

colororderSet or query color order palette
orderedcolorsColor palettes for visualizing multiple data series (Since R2023b)
linestyleorderSet or query line style order (Since R2024a)

Tiling Plots

tiledlayoutCreate tiled chart layout for displaying subplots
nexttileCreate axes in tiled chart layout
tilenumTile location numbers in tiled chart layout (Since R2022b)
tilerowcolRow and column numbers in tiled chart layout (Since R2022b)
subplotCreate axes in tiled positions
claClear axes
clfClear figure
axesCreate Cartesian axes
figureCreate figure window

Properties

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

Topics

Limits, Ticks, and Grids

  • 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.
  • Using Graphics Smoothing
    This example shows how to use graphics and font smoothing in your plots.

Multiple Plots

  • Combine Multiple Plots
    Show multiple plots together in the same figure, either by combining the plots in the same axes or by creating a tiled chart layout.
  • 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.
  • Display Data with Multiple Scales and Axes Limits
    Learn about techniques for visualizing data with multiple x- and y-axes, multiple colorbars, or with an x-axis that is broken into intervals.
  • Customized Presentations and Special Effects with Tiled Chart Layouts
    Explore the different ways you can use a tiled chart layout to arrange the elements in a visualization.

Size and Aspect Ratio

  • 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
    Control the axes size and position, the layout of titles and labels, and the axes resize behavior.
  • Clipping in Plots and Graphs
    This example shows how MATLAB® uses clipping in plots and how to control clipping.

MATLAB Command

You clicked a link that corresponds to this MATLAB command:

 

Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.

Axes Appearance- MATLAB & Simulink- MathWorks Benelux (1)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
  • 日本 (日本語)
  • 한국 (한국어)

Contact your local office

Axes Appearance
- MATLAB & Simulink
- MathWorks Benelux (2025)

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Moshe Kshlerin

Last Updated:

Views: 5579

Rating: 4.7 / 5 (57 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Moshe Kshlerin

Birthday: 1994-01-25

Address: Suite 609 315 Lupita Unions, Ronnieburgh, MI 62697

Phone: +2424755286529

Job: District Education Designer

Hobby: Yoga, Gunsmithing, Singing, 3D printing, Nordic skating, Soapmaking, Juggling

Introduction: My name is Moshe Kshlerin, I am a gleaming, attractive, outstanding, pleasant, delightful, outstanding, famous person who loves writing and wants to share my knowledge and understanding with you.