uiaxes
Create axes for App Designer style apps.
📝Syntax
ax = uiaxes()
ax = uiaxes(parent)
ax = uiaxes(..., propertyName, propertyValue)
📥Input Arguments
Parameter Description
parent parent container.
propertyName, propertyValue name-value pairs.
📤Output Arguments
Parameter Description
ax axes object.
📄Description

ax = uiaxes creates axes suitable for uifigure based apps and returns the axes object. It behaves like axes with UIAxes defaults: Units = 'pixels', Position = [10 10 400 300], NextPlot = 'replacechildren', FontUnits = 'pixels'. Pass the axes to plotting functions: plot(ax, ...).

💡Examples
Captured UI component for the help image.
f = uifigure('Visible', 'off', 'Name', 'Axes UI', 'Position', [100 100 420 260]);
f.HandleVisibility = 'on';
ax = uiaxes(f, 'Position', [45 45 330 175]);
x = 0:0.1:2*pi;
plot(ax, x, sin(x), 'LineWidth', 1.5);
title(ax, 'Sine');
drawnow();
Example illustration
uiaxes
f = uifigure();
ax = uiaxes(f, 'Position', [30 30 400 300]);
plot(ax, 1:10, (1:10).^2);
🔗See Also
uifigure
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub