www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/PlotCategoricalPieWithOffsetsExample.m
%% Plot Categorical Pie Chart with Offsets % Plot a categorical pie chart with offset slices corresponding to % categories. % Copyright 2015 The MathWorks, Inc. X = categorical({'North','South','North','East','South','West'}); explode = {'North','South'}; pie(X,explode) %% % Now, use a logical vector to offset the same slices. explode = [0 1 1 0]; pie(X,explode)