How to plot pie chart in Matlab GUI using buttons?
조회 수: 9 (최근 30일)
이전 댓글 표시
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
채택된 답변
Adam Danz
2020년 4월 6일
Hint: "Labels" is not the same as "labels". Variable names are case sensitive.
댓글 수: 3
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Pie Charts에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!