Now let us have a try of this command.
\begin{pspicture}(-5,-5)(8,5)
%Pie chart
\psChart{1,2,2,3,1,4}{1,5}{4.75}
%The legends
\psframe[fillcolor=chartFillColor1,
fillstyle=solid](5.25,-5)(6.5,-4.5)
\uput[r](6.5,-4.75){Pie 1}
\psframe[fillcolor=chartFillColor2,
fillstyle=solid](5.25,-4)(6.5,-3.5)
\uput[r](6.5,-3.75){Pie 2}
\psframe[fillcolor=chartFillColor3,
fillstyle=solid](5.25,-3)(6.5,-2.5)
\uput[r](6.5,-2.75){Pie 3}
\psframe[fillcolor=chartFillColor4,
fillstyle=solid](5.25,-2)(6.5,-1.5)
\uput[r](6.5,-1.75){Pie 4}
\psframe[fillcolor=chartFillColor5,
fillstyle=solid](5.25,-1)(6.5,-0.5)
\uput[r](6.5,-0.75){Pie 5}
\psframe[fillcolor=chartFillColor6,
fillstyle=solid](5.25,0)(6.5,0.5)
\uput[r](6.5,0.25){Pie 6}
\end{pspicture}
![]() |
| Fig.1 Pie chart plots in Pstricks |
In the upper example, we see that a pie chart with radius "5" is plotted accroding to data "{1,2,2,3,1,4}", and the 1-st and 5-th pie pieces is outraged. This is exactly what we expected. And with the help of variable "chartFillColornum" we produced the legends.
Files Downloads: tex ps pdf


No comments:
Post a Comment