8

I'm able to draw pie chart using tex code mentioned below:

\documentclass[landscape,a3paper,11pt]{article}
\usepackage{pstricks-add}
\usepackage{pgfplots, pgfplotstable}
\begin{document}
\begin{center}
\begin{pspicture}(-5,-4)(4,4)
\psset{unit=1.2}
\psChart[userColor={black!10,black!40},chartSep=10pt,chartNodeI=0.5,shadow,shadowsize=3pt]{10,90}{}{3}
\bfseries
\rput(psChartI1){Above 10 \%}
\rput(psChartI2){Below 90 \%}
\end{pspicture}
\end{center}
\end{document}

I want to move text inside pie chart to outside (as highlighted in RED color) can you please suggest?

enter image description here

10
+150

You must use the outer nodes (with letter O) for the positioning (see texdoc pstricks-add):

\documentclass[pstricks]{standalone}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}(-7,-4)(7,4)
\psset{unit=1.2}
\psChart[userColor={black!10,black!40},shadow,shadowsize=3pt, chartNodeO=1.15]{10,90}{}{3}
\bfseries
\ncline[arrows=<-, arrowscale=1.5, nodesepB=2pt]{psChartI1}{psChartO1}
\ncline[arrows=<-, arrowscale=1.5, nodesepB=2pt]{psChartI2}{psChartO2}
\rput[l](psChartO1){Above 10 \%}
\rput[r](psChartO2){Below 90 \%}
\end{pspicture}
\end{document}

That gives:

enter image description here

  • Thank You I'm able to get text outside, is there any way to draw arrow (from pie to outside text)? – Pawan Mude Nov 5 '13 at 12:18
  • 3
    Yes, see the edited answer, and texdoc pstricks-add ;) – Christoph Nov 5 '13 at 12:24
  • :) Thank you ; it's working perfectly ; I'll surely read texdoc mentioned by you – Pawan Mude Nov 5 '13 at 12:34

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.