1

Could you tell me how to remove the percentage numbers in a pie chart using the "pgf-pie" package? I got the following working code example, but as I said I would like to remove the perecentage numbers in the graphic.

\documentclass{article}
\usepackage{pgf-pie}


\newcommand{\QR}[1][n]{\mathcal{QR}_{#1}}
\newcommand{\QNR}[1][n]{\mathcal{QNR}_{#1}}
\newcommand{\QNRP}{\mathcal{QNR}_n^{+1}}
\newcommand{\JNP}{\mathcal{J}_n^{+1}}
\newcommand{\JNM}{\mathcal{J}_n^{-1}}



\begin{document}

\begin{tikzpicture}[scale=1.25]

\pie [rotate = 90, text=inside, color = {red!50, blue!50}, scale font]
{50/$\QR[p]$,
    50/$\QNR[p]$}

\end{tikzpicture}

\end{document}
3nondatur
  • 483

1 Answers1

1

Welcome to TeX-SE! One way is to redefine \afternumber, which can be done with a pgf key.

\documentclass{article}
\usepackage{pgf-pie}


\newcommand{\QR}[1][n]{\mathcal{QR}_{#1}}
\newcommand{\QNR}[1][n]{\mathcal{QNR}_{#1}}
\newcommand{\QNRP}{\mathcal{QNR}_n^{+1}}
\newcommand{\JNP}{\mathcal{J}_n^{+1}}
\newcommand{\JNM}{\mathcal{J}_n^{-1}}



\begin{document}

\begin{tikzpicture}[scale=1.25]

\pie [rotate = 90, text=inside, color = {red!50, blue!50}, scale font,
/after number/.code={}]
{50/$\QR[p]$,
    50/$\QNR[p]$}

\end{tikzpicture}

\end{document}

enter image description here