# Neat & Clean Method to Draw Pie Chart in Latex over Ubuntu(14.04 LTS).

The pgf-pie is package provided by google developers for drawing pie chart in latex is using pgf-pie style class.

i downloaded the pgf-pie from google at link  https://code.google.com/p/pgf-pie/

Once downloaded now how to install this file on to ubuntu. One thing that makes LaTeX so powerful is the enourmous amount of extensions available. Some extensions, usually with the .sty filename extension, do not come with an installation tutorial. I consider that they do not come with a tutorial because it is assumed it is an easy task. Another reason for having no installation instructions might be because it is platform dependent (i.e., different installation directories).

The directory for installing LaTeX files, on Ubuntu: –

/usr/share/texlive/texmf-dist/tex/latex/

This is an example on how to install the pgf-pi extension, using the TeXLive distribution:

1. create a directory named pgf-pie  on /usr/share/texlive/texmf-dist/tex/latex/
2. copy the file prooftree.sty and the file prooftree.tex to the directory /usr/share/texlive/texmf-dist/tex/latex/pgf-pie
3. run sudo mktexlsr

mktexlsr: Updating /usr/local/share/texmf/ls-R…
mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVEDIST…
mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN…
mktexlsr: Updating /var/lib/texmf/ls-R…
mktexlsr: Done.

Once it is Done, You are ready to use pgf-pie. Open your Editor and

\usepackage{tikz}

\usepackage{pgf-pie}

and then

\begin{tikzpicture}
\pie{10/A, 20/B, 30/C, 40/D}
\end{tikzpicture}

You will see the desired ouptut.

Advertisements