axes

Create a new axes or set current axes by passing a handle argument.

Syntax

h = axes()

h = axes(handle)

h = axes(parent)

h = axes(..., property, value, ...)

Inputs

handle
Handle of an axes object which is set as the active axes.
Type: double
Dimension: scalar
parent
Handle of a container object, which could be a figure, uipanel, or uitab.
Type: double | integer
Dimension: scalar
property
Properties that control the appearance of the axes object.
Type: string
Dimension: scalar
value
Value of properties.
Type: double | integer | string
Dimension: scalar | vector

Outputs

h
Axes handle.

Example

Simple axes example:
Figure 1. New axes created in the current figure


axes as a child of a uipanel:
figure();
p = uipanel('position',[10 10 600 400]);
ax = axes(p,'position',[0.1 0.1 0.8 0.8]);
Figure 2. Axes in a uipanel


axes as a child of a uitab:
figure();
t = uitabgroup('position', [0 0 600 400]);
tab1 = uitab(t);
tab2 = uitab(t);
ax = axes(tab1,'position', [0.0 0.0 0.5 0.5]);
Figure 3. Axes in a uitab