2D Functions
Function Plot
Parametric Plot
Multiple Parametric Plot
Filled Plot
Multiple Filled Plot
Logarithmic Plot


2D Data Plots
Data Plot
Data Error Plot
Data Logarithmic Plot
Data Labeled Plot


Contour & Density Plots
Contour Plot
Density Plot
Level Curves


3D Functions
3D Function Plot
3D Parametric Plot
3D Multiple Parametric Plot
3D Vector Field
3D Gradient Field
Shadow 3D Function

3D Data Plots
Contour 3D Data Plot
Density 3D Data Plot


Special Plots
Vector Field
Bar Charts
Pie Chart
Zonotope Show


Links
About This Site
Citation & Credits
Sci.Vis. Tutorials
webComputing


Pie Chart

Pie Chart generates a pie chart from a list of positive numbers. Several options are available for controlling the style of the pie.

Enter a list of values:   ">

Pie Options:

> Show the values on the Chart


Enter a list of Pie labels:   " >

Plot label:   " >

Pie Color Style:   " >

Pie Exploded:   (cuts off pieces of the Pie)
This option moves designated wedges away from the center of the chart. The default is None, that is, no wedges are moved. You can specify a {number, distance} pair instead of just the index of a wedge to indicate how far out the wedge should be moved. The wedges are numbered counterclockwise, starting from the middle right.

<%Mathlet MSPSetDefault[$$exploted, "None"] %>   > None    > All    > Specified    " >

General Options:

Frame: <%Mathlet MSPSetDefault[$$frame, "False"] %>   > True    > False

Image size:   ">   specifies that the image should have a width of x printer's points




<%Mathlet Needs["Graphics`Graphics`"]; %> <%Mathlet exp = Null; If[$$exploted === "Specified", exp = MSPToExpression[$$explotedvalue], exp = MSPToExpression[$$exploted] ]; MSPBlock[{$$list, $$pielabels, $$plotlabel, $$frame, $$piestyle, $$imageSize}, d = ReleaseHold[MapAt[ToString, MapAt[HoldForm, HoldForm[$$pielabels], Table[{1, i}, {i, Length[HoldForm[$$pielabels][[1]]]}] ], Table[{1, i}, {i, Length[ HoldForm[$$pielabels][[1]]]}] ] ]; For[i = 1, i <= Length[d], If[Part[d, i] === "Null", Part[d, i]= ""]; i++]; If[Length[d] < Length[$$list], Do[d = Append[d, ""],{Length[$$list] - Length[d]}]]; labels = If[ $$shownames =!= "on", d, MapThread[#1 <> ", " <> ToString[#2] &, {d, $$list}]]; For[i = 1,i <= Length[$$list], If[ MatchQ[labels[[i]],", " <> ToString[$$list[[i]]]], labels[[i]] = $$list[[i]]]; i++ ]; result = PieChart[ $$list, PieLabels->labels, PlotLabel-> If[$$plotlabel === Null, "", ToString[HoldForm[$$plotlabel]]], Frame->$$frame, ImageSize->If[NumberQ[$$imageSize],$$imageSize,Automatic], PieStyle->$$piestyle, PieExploded->exp ]; If[Head[result] === Graphics, MSPShow[result]] ] %> <%Mathlet MSPBlock[{$$fname, $$submitButton1}, c = If[$$fname === Null, "", ToString[$$fname]]; ftype = Switch[$$opt, "jpg", "JPEG", "tif", "TIFF", "eps", "EPSTIFF", "xbm", "XBitmap", "mps", "MPS", _ , $$opt]; If[Head[result] === Graphics, MSPReturn[DisplayString[result, ftype], "image/"<>ftype , c<>"."<>$$opt] ] ] %>

Save as: 

With file name:  " >

  
© 2004 webComputing,   Scientific Visualization