create empty pie chart (or not generate the graph)
显示 更早的评论
Hi! I would like to create empty pie chart (I know it is not very useful).
Using 'pie' does not allow this. so I had thought of generating a circle and placing the legend on the side. Is this possible?
matrix_new = [];
labels = matrix_new(:,1);
percentages = matrix_new(:,2);
figure
p = pie(percentages);
theta = linspace(0,2*pi,500);
line(cos(theta),sin(theta),'Color','k','LineWidth',0.6);
label_str = load("label_str.mat");
lgd.Title.String = "title";
If it's not possibile, how can I make it so that when 'matrix_new' is empty it doesn't generate the graph for me (so don't do anything)?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Pie Charts 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
