UIAxes plot vs Axes plot in App

조회 수: 39 (최근 30일)
Mike D.
Mike D. 2021년 1월 24일
편집: Adam Danz 2021년 6월 17일
I'm somewhat new to App Designer, but have made lots of programmatic GUIs. I have an App GUI that creates plots. My plots use figure and axes, but does not imbed these on the UIFigure GUI window. I want the plots to be separate figure windows. Are there any advantages in creating separate plots in UIFigure and UIAxes, versus figure and axes?

채택된 답변

Adam Danz
Adam Danz 2021년 1월 24일
편집: Adam Danz 2021년 6월 17일
> Are there any advantages in creating separate plots in UIFigure and UIAxes, versus figure and axes?
My opinion: If your existing GUI/App already creates figures external to the GUI/App with the standard figure/axes, I see no reason to switch to uifigure/uiaxes. Depending on how your code is set up, you'd likely have to modify it if you want uifigure/uiaxes to look like the current versions of your figures.
For example, the Position property of regular axes is the same as the InnerPosition property but in UIAxes, the Position property is the same as the OuterPosition property and the InnerPosition property in UIAxes is equivalent to the Position property of regular axes. For 2D plots, the axis box is defined by Position/InnerPosition for regular axes but for UIAxes, it's only defined by InnerPosition and not by the Position property (which is read-only).
Another example, since HandleVisibility of UIFigures is set to off by default, you'd either need to set that to on or you'd need to provide axis handles to all of the graphics objects (which is good practice, anyway). Some features are not supported with uiaxes such as ginput (current release: r2020b). Since there are limitations with uifigures/uiaxes and since the conversion would likely involve modifications to your existing plotting functions, the costs would likely outweigh the benefits.
If you're planning on embedding the plots within the app, in tabs for example, then you'd want to use uiaxes which are designed for smooth interaction with app designer apps in uifigures.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop uifigure-Based Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by