Drawing a pie chart
Pie charts are popular for showing proportions. A pie chart's main characteristic is that all items usually sum up to 100 percent. They are displayed as segments of a disc.
As an example, we will use a pie chart to display the relative amount of questions about different TeX distributions.
How to do it...
We will use the pgf-pie
package, which builds on TikZ and is specialized for generating pie charts. Follow these steps:
Start with a document class:
\documentclass{article}
Load the
pgf-pie
package:\usepackage{pgf-pie}
Begin the document:
\begin{document}
Begin a TikZ picture, which will be the container of the pie chart:
\begin{tikzpicture}
Draw a pie chart using this command:
\pie [rotate = 180] {62/\TeX\ Live and Mac\TeX, 32/MiK\TeX\ and Pro\TeX t, 6/Other \TeX}
End the TikZ picture and the entire document:
\end{tikzpicture} \end{document}
Compile and take a look at the result:
How it works...
The \pie
command is the only user command in the pgf-pie
package. The...