Use Pie in App? - UIAxes

13 ビュー (過去 30 日間)
Sebastian G.
Sebastian G. 2017 年 3 月 21 日
回答済み: Renee Coetsee 2017 年 3 月 23 日
Hi, is there any way to use pie in matlab.ui.control.UIAxes?
pie(app.sucessUIAxes,X,{'sucess', 'fail'});
Error using patch
While setting property 'Parent' of class 'Patch':
Functionality not supported with UIAxes. For more information, see Graphics Support in App Designer.
Error in pie (line 118)
h = [h,patch('XData',xx,'YData',yy,'CData',i*ones(size(xx)), ...
Hacks are also fine... (pie returns a vector of patch and text graphics objects.) Is there any other option to display the vectors of patch?
Thanks for helping

回答 (1 件)

Renee Coetsee
Renee Coetsee 2017 年 3 月 23 日
The uiaxes in App Designer does not yet support "patch" objects as of R2017a.
One way to work around this limitation is to add a button in your App Designer that opens a separate figure with a regular axes. For example, the button could have the following callback:
hfig_new = figure;
hax_new = axes('Parent',hfig_new);
pie(hax_new,X,{'sucess', 'fail'});
I hope this helps!

カテゴリ

Help Center および File ExchangePie Charts についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by