1

I want to make a pie chart with pgf-pie that shows not the percentage inside the pie but the absolute values. For example 15 males and 3 females in my example below. Is this possible with pgf-pie?

\documentclass[12pt]{standalone}
\usepackage{pgf-pie}
\usepackage{xcolor}
\begin{document}
\begin{tikzpicture}
 \pie[rotate = 180,
        color = {orange!40!white, orange!80!white}]
    {27.78/females, 72.22/males}
\end{tikzpicture}
\end{document}

enter image description here

3

If you use the option sum = auto (or sum = <some value>) the package will automatically remove the \% after the number (actually the package sets after number = \% when sum = 100, the default):

enter image description here

\documentclass[12pt]{standalone}
\usepackage{pgf-pie}
\usepackage{xcolor}
\begin{document}
\begin{tikzpicture}
 \pie[rotate = 180, sum = auto,
        color = {orange!40!white, orange!80!white}]
    {27.78/females, 72.22/males}
\end{tikzpicture}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.