catch UIAxes in figure

 Accepted Answer

Use uifigure instead of a generic figure.
fig = uifigure;
ax = uiaxes(fig);

1 Comment

The key is to specify the figure handle as @Angelo Yeo demonstrated above. You can use figure or uifigure but in uifigures the HandleVisibility property is off by default so if you call axes() or uiaxes() without specifying the figure handle, the axes will go into a new figure.

Sign in to comment.

More Answers (0)

Categories

Asked:

on 11 Oct 2023

Commented:

on 11 Oct 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!