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.
- parent
- Handle of a container object, which could be a figure, uipanel, or uitab.
- property
- Properties that control the appearance of the axes object.
- value
- Value of properties.
Outputs
- h
- Axes handle.
Example
Simple axes example:

Figure 1. New axes created in the current figure

Figure 1. New axes created in the current figure
axes as a child of a
uipanel:

Figure 2. Axes in 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 3. Axes in 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