logo for matrixlab-examples.com
[?] Subscribe To This Site

XML RSS
Add to Google
Add to My Yahoo!
Add to My MSN
Subscribe with Bloglines


Home
Matrixmania Blog
Contact
-> Sitemap <-
Matlab Books
Quick Matlab Guide
Matlab Tutorials
Matlab Examples
Matlab Flow Control
Boolean Algebra
Linear Algebra
Matlab 2D Plots
Matlab 3D Plots
Matlab GUI
Matlab Cookbook I
Matlab Cookbook II
Probability and Stats
Forums and Help
Relevant Links
Fun!
Your own Website?
Terms/Policies
leftimage for matrixlab-examples.com

3D Pie Charts

In Matlab, the expression 'pie3(V)' draws a 3D pie chart using the data in V. Each element in V is represented as a slice (with a %) in the plot.

Example 1:



p = [3.3 2.6 .69 .4 .3];
pie3(p)
title('Interesting Chart')

results in:
3D pie chart 1

In the expression 'pie3(V, explode, labels)', 'explode' specifies whether to separate a slice from the center of the plot. V(i,j) is apart from the center of the pie plot if explode(i,j) is nonzero. 'explode' must be the same size as V. 'labels' specifies text labels for the slices. The number of labels must equal the number of elements in V.

Example 2:



d = [1 2 3 2.5];
pie3(d, [1 0 1 0],...
    {'Label 1', 'Label 2', 'Label 3', 'Label 4'})
title('Pie Chart showing explosions...')

results in:
pie chart 2

From 'Pie Charts' to home
From 'Pie Charts' to '3D plot Menu'

footer for pie charts page