我能够使用下面提到的 tex 代码绘制饼图:
\begin{center}
\begin{pspicture}(-7,-4)(7,4)
\psset{unit=1.2}
\psChart[userColor={black!10,black!40,black!70},shadow,shadowsize=3pt, chartNodeO=1.15]{98,1,1}{}{3}
\bfseries%
\ncline[arrows=<-, arrowscale=1.5, nodesepB=2pt]{psChartI1}{psChartO1}
\ncline[arrows=<-, arrowscale=1.5, nodesepB=2pt]{psChartI2}{psChartO2}
\ncline[arrows=<-, arrowscale=1.5, nodesepB=2pt]{psChartI3}{psChartO3}
\rput[c](psChartO1){98 \% scored more than you.}
\rput[c](psChartO2){1 \% scored less than you.}
\rput[c](psChartO3){1 \% scored equal to you.}
\end{pspicture}
\end{center}
提到了 MWE 代码这里
问题是当两个连续的饼图彼此相邻时非常小(有时文本和箭头也会重叠),文本会重叠,示例图像如下所示:
您能建议如何纠正这个问题吗?
答案1
一种可能性是使用除之外的另一个参考[c]
点\rput
:
\documentclass[margin=5pt, pstricks]{standalone}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}(-9,-4)(9,4)
\psChart[userColor={black!10,black!40,black!70},shadow,shadowsize=3pt, chartNodeO=1.15]{98,1,1}{}{3}
\bfseries%
\ncline[arrows=<-, arrowscale=1.5, nodesepB=2pt]{psChartI1}{psChartO1}
\ncline[arrows=<-, arrowscale=1.5, nodesepB=2pt]{psChartI2}{psChartO2}
\ncline[arrows=<-, arrowscale=1.5, nodesepB=2pt]{psChartI3}{psChartO3}
\rput[r](psChartO1){98 \% scored more than you.}
\rput[lt](psChartO2){1 \% scored less than you.}
\rput[lb](psChartO3){1 \% scored equal to you.}
\end{pspicture}
\end{document}