www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/Create3DPieChartExample.m

    %% Create 3-D Pie Chart
% Create a 3-D pie chart of vector |x|. 

% Copyright 2015 The MathWorks, Inc.

x = [1,3,0.5,2.5,2];
figure
pie3(x)

%%
% To offset the second pie slice, set the corresponding
% |explode| element to 1.

explode = [0,1,0,0,0];
figure
pie3(x,explode)