类别标签不适用于Matlab GUI

时间:2018-07-27 13:35:24

标签: matlab matlab-figure matlab-guide

我设计的GUI无法在barh中显示类别?谁能指导?

        c = {'Triangle','Square','Round'};
        triangle=66;
        squre=23;
        round=11;
        total=triangle+squre+round;
        percentage = [triangle/total squre/total round/total].*100; 
        set(handles.axes1,'Visible','on');
        cla(handles.axes1,'reset');
        axes(handles.axes1)
        barh(percentage)
        set(gca,'yticklabel',{c{:}})
        axis off

这是输出

enter image description here

0 个答案:

没有答案