Clear Filters
Clear Filters

catch UIAxes in figure

7 views (last 30 days)
aldo
aldo on 11 Oct 2023
Commented: Adam Danz on 11 Oct 2023
how catch UIAxes in new figure?
figure;

Accepted Answer

Angelo Yeo
Angelo Yeo on 11 Oct 2023
Use uifigure instead of a generic figure.
fig = uifigure;
ax = uiaxes(fig);
  1 Comment
Adam Danz
Adam Danz on 11 Oct 2023
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

Find more on Develop uifigure-Based Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!