How to plot pie chart in Matlab GUI using buttons?
27 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Miss B
am 6 Apr. 2020
Bearbeitet: Adam Danz
am 6 Apr. 2020
Hi again,
I have 3 buttons named "Weekone", "Month" "Year" - I want to plot 3 pie charts using axes when the buttons are pressed.
Here's my code below:
function weekone_Callback(hObject, eventdata, handles)
X = categorical ({'Present','Absence'});
explode = {'Absence'};
Labels = {'91%','9%'};
axes(handles.axes3);
pie(X,explode,labels);
I get the following error:
Unrecognized function or variable 'labels'.
Error in myprofile>weekone_Callback (line 281)
pie(X,explode,labels);
0 Kommentare
Akzeptierte Antwort
Adam Danz
am 6 Apr. 2020
Hint: "Labels" is not the same as "labels". Variable names are case sensitive.
3 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Pie Charts finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!