summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXu Yuan <xu@informatik.hu-berlin.de>2011-10-02 18:41:24 +0200
committerXu Yuan <xu@informatik.hu-berlin.de>2011-10-02 18:41:24 +0200
commit284eaa2eb6c9e652a54d3ea668dd7cec896c795c (patch)
tree85f15791d5bb5ab3bb8221e1cd6b3b36d927997c
parent241871ce504828cf4a43c04511760e6392e39c59 (diff)
downloadpgf-pie-284eaa2eb6c9e652a54d3ea668dd7cec896c795c.tar.gz
pgf-pie-284eaa2eb6c9e652a54d3ea668dd7cec896c795c.tar.bz2
pgf-pie-284eaa2eb6c9e652a54d3ea668dd7cec896c795c.zip
imporve doc
-rw-r--r--dev/demo/population.tex2
-rw-r--r--dev/pgf-pie-manual.tex94
2 files changed, 55 insertions, 41 deletions
diff --git a/dev/demo/population.tex b/dev/demo/population.tex
index 1b39664..9267acb 100644
--- a/dev/demo/population.tex
+++ b/dev/demo/population.tex
@@ -1,6 +1,6 @@
% data from http://en.wikipedia.org/wiki/List_of_countries_by_population
\begin{tikzpicture}
- \pie[polar, sum=auto, radius=35, after number=, text=pin] {1339/China,
+ \pie[cloud, rotate=45, sum=auto, radius=35, after number=, text=pin] {1339/China,
1210/India, 312/USA, 237/Indonesia, 190/Brazil, 177/Pakistan,
158/Nigeria, 151/Bangladesh, 142/Russia, 127/Japan, 112/Mexico,
94/Philippines, 87/Vietnam, 82/Ethiopia, 81/Germany, 80/Egypt,
diff --git a/dev/pgf-pie-manual.tex b/dev/pgf-pie-manual.tex
index 955334d..9c5c8f4 100644
--- a/dev/pgf-pie-manual.tex
+++ b/dev/pgf-pie-manual.tex
@@ -75,11 +75,11 @@ keywordstyle=\color{blue}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{abstract}
- \texttt{pgf-pie} is a LaTeX package for drawing pie chart. As stated
- by its name, it is based on a very popular graphic package
- \texttt{PGF/TikZ}. This document presents the usage of
- \texttt{pgf-pie} and collects some pie charts as examples.
- \texttt{pgf-pie} can be downloaded from
+ \texttt{pgf-pie} is a LaTeX package for drawing pie chart (and
+ variant charts). As stated by its name, it is based on a very
+ popular graphic package \texttt{PGF/TikZ}. This document presents
+ the usage of \texttt{pgf-pie} and collects some pie charts as
+ examples. \texttt{pgf-pie} can be downloaded from
\href{http://code.google.com/p/pgf-pie/}{http://code.google.com/p/pgf-pie/}.
\end{abstract}
@@ -88,23 +88,16 @@ keywordstyle=\color{blue}
\section{The Essentials}
\subsection{First Pie}
-\demo[0.6]{first-pie}
-
-\subsection{Variants}
-\subsubsection{Polar area diagram}
-The polar area diagram is similar to a usual pie chart, except sectors
-are equal angles and differ rather in how far each sector extends from
-the center of the circle.
-
-\demo[0.6]{polar}
-
-\subsubsection{Square}
-
-\demo[0.6]{square}
-
-\subsubsection{Cloud}
-
-\demo[0.6]{cloud}
+\lstinline|\pie| is the only coomand that provided by
+\texttt{pgf-pie}. The argument is a list of number and text
+combination in the formate of \texttt{number/text}, i.e. \texttt{10/A,
+ 20/B, 30/C, 40/D}. The result is shown in figure \ref{fig:first-pie}.
+\begin{figure}
+ \centering
+ \demo[0.6]{first-pie}
+ \caption{The first pie.}
+ \label{fig:first-pie}
+\end{figure}
\subsection{Position, Rotation, Size}
@@ -115,12 +108,37 @@ is 3.
\demo{radius}
+\subsection{Color}
+The color can be specified by \texttt{color}, the default color wheel
+is shown in figure \ref{fig:color-wheel}.
+\begin{figure}
+ \centering
+ \input{demo/colorwheel}
+ \caption{Default color wheel}
+ \label{fig:color-wheel}
+\end{figure}
+
+\demo{color}
+
\subsection{Explode}
\demo{explode}
+\subsection{Angle of slices}
+The value of \texttt{sum} indicats the sum of all data in the chart,
+it is 100 by default. It can be calculated automatically when
+\texttt{auto} is set. Then the angle of slices are determined by
+number value and \texttt{sum}.
+
+\demo{sum}
+
\subsection{Text}
\subsubsection{Number}
+Two parameters can be used to decorate number: \texttt{before number}
+and \texttt{after number}. Both are empty by default, but if
+\texttt{sum=100}, \texttt{after number} will be set to \%
+automatically if user doesn't set it.
+
\demo[0.6]{before-after-number}
\subsubsection{Label text}
@@ -133,31 +151,27 @@ The value of \texttt{text} can be \texttt{label}(default),
\demo[0.6]{legend}
-\subsection{Sum}
-The value of \texttt{sum} indicats the sum of all data in the chart,
-it is 100 by default. It can be calculated automatically when
-\texttt{auto} is set.
+\subsection{More about style}
+\subsubsection{shadow}
+\demo[0.6]{shadow}
-\demo{sum}
+\section{Variant Charts}
+\subsection{Polar area diagram}
+The polar area diagram is similar to a usual pie chart, except sectors
+are equal angles and differ rather in how far each sector extends from
+the center of the circle.
-\subsection{Color}
-The color can be specified by \texttt{color}, the default color wheel
-is shown in figure \ref{fig:color-wheel}.
+\demo[0.6]{polar}
-\demo{color}
+\subsection{Square}
+\demo[0.6]{square}
-\begin{figure}
- \centering
- \input{demo/colorwheel}
- \caption{Default color wheel}
- \label{fig:color-wheel}
-\end{figure}
+Note: \texttt{explode} has no affects in sqaure chart.
+\subsection{Clouds}
-\subsection{Style}
-\subsubsection{shadow}
-\demo[0.6]{shadow}
+\demo[0.6]{cloud}
\section{Examples}