"Ordinary" figures in an AppDesigner panel

36 ビュー (過去 30 日間)
Jack
Jack 2020 年 3 月 27 日
回答済み: Sahithi Kanumarlapudi 2020 年 4 月 24 日
I am a scientist, quickly writing a gui for others in the lab to use that provides an interface to a very large, complex and independently-developed spectral fitting and simulation package. I do not have easy control over this package, and parts of it have (frustratingly) been p-coded by the author. Whilst everything works well, the library uses figure() commands for plotting; one can supply a figure argument (i.e. a typical figure handle) to provide a window to plot into.
The AppDesigner GUI works well, but in particular I would very much like to "dock" a typical figure into an AppDesigner figure, and provide a figure handle that could be interpreted by plot/etc in a normal way.
I realise that literally all the documentation says that this can't really be done, but if there's any sort of hackyish way to do this, I'd appreciate knowing it. At the moment I have a uifigure with two panels created through uigridlayout. The idea is the left one contains various options, etc, and the right the resulting plot(s). At present it works brilliantly, just with nothing in the right panel and all figures appearing in base Matlab.

回答 (1 件)

Sahithi Kanumarlapudi
Sahithi Kanumarlapudi 2020 年 4 月 24 日
Hi,
As you already know, you could not place a figure inside the app as the 'Parent' property of figures created using 'uifigure' is read-only. But you could consider plotting each plot on a seperate axes and placing all the axes inside the panel you have created as it is possible to set the parent property of 'uiaxes' to be the panel you have created.
For more details on how to create the uiaxes you could refer to the following links

カテゴリ

Help Center および File ExchangeDevelop uifigure-Based Apps についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by