\documentclass[border=10pt]{standalone}
\usepackage{pstricks-add}
\begin{document}
\psset{unit=1.5cm,linejoin=1}
\begin{pspicture}(-2.1,-2.1)(2.1,2.1)
\SpecialCoor
\degrees[100]
%%%%
\rput(.05;8.5){\pswedge[fillstyle=solid,fillcolor=gray,hatchcolor=gray]{2}{0}{17}
\rput(1.2;8){\psframebox*{\small 17 \%}}}
%%%%
\rput(.05;! 17 12.5 add){\pswedge[fillstyle=hlines,fillcolor=gray,hatchcolor=gray]{2}{17}{42}
\rput(1.2;29){\psframebox*{\Large 25 \%}}}
%%%%%
\rput(.05;! 42 8 add){\pswedge[fillstyle=solid,fillcolor=gray,hatchcolor=gray]{2}{42}{58}
\rput(1.2;50){\psframebox*{\Large 16 \%}}}
%%%%
\rput(.05;! 58 12.5 add){\pswedge[fillstyle=hlines,fillcolor=gray,hatchcolor=gray]{2}{58}{83}
\rput(1.2;71){\psframebox*{\Large 25 \%}}}
%%%%
\rput(.05;! 83 8.5 add){\pswedge[fillstyle=solid,fillcolor=gray,hatchcolor=gray]{2}{83}{100}
\rput(1.2;92){\psframebox*{\Large 17 \%}}}
\psdot(0,0)
\end{pspicture}
\end{document}
如您所见,它歪了。我该怎么办?
答案1
楔形的中心各不相同,因此相应的圆弧在几何上不可能位于同一个圆上。这些中心离原点越近,圆弧就越接近理想圆。因此,我减小了中心与原点的距离,并对其中一些中心的极角做了一些改动。请看看这对您是否合适:
\documentclass[border=10pt]{standalone}
\usepackage{pstricks-add}
\begin{document}
\psset{unit=1.5cm,linejoin=1}
\begin{pspicture}(-2.1,-2.1)(2.1,2.1)
\SpecialCoor
\degrees[100]
%%%%
\rput(.03;8.5){\pswedge[fillstyle=solid,fillcolor=gray,hatchcolor=gray]{2}{0}{17}
\rput(1.2;8){\psframebox*{\small 17 \%}}}
%%%%
\rput(.03;29){\pswedge[fillstyle=hlines,fillcolor=gray,hatchcolor=gray]{2}{17}{42}
\rput(1.2;29){\psframebox*{\Large 25 \%}}}
%%%%%
\rput(.03;50){\pswedge[fillstyle=solid,fillcolor=lightgray,hatchcolor=gray]{2}{42}{58}
\rput(1.2;50){\psframebox*{\Large 16 \%}}}
%%%%
\rput(.03;70.5){\pswedge[fillstyle=hlines,fillcolor=gray,hatchcolor=gray]{2}{58}{83}
\rput(1.2;71){\psframebox*{\Large 25 \%}}}
%%%%
\rput(.03;90){\pswedge[fillstyle=solid,fillcolor=gray,hatchcolor=gray]{2}{83}{100}
\rput(1.2;92){\psframebox*{\Large 17 \%}}}
\psdot(0,0)
\end{pspicture}
\end{document}
答案2
它不可能正好位于外圆上!
\documentclass[border=10pt]{standalone}
\usepackage{pstricks-add}
\begin{document}
\psset{unit=1.5cm,linejoin=1}
\begin{pspicture}(-2.1,-2.1)(2.1,2.1)
\degrees[100]%
%%%%
\pswedge[fillstyle=solid,fillcolor=gray,hatchcolor=gray](0.05;8.5){2}{0}{17}
\rput*(1.2;8){\small 17 \%}%
%%%%
\pswedge[fillstyle=hlines,fillcolor=gray,hatchcolor=gray](0.05;29.5){2}{17}{42}
\rput*(1.2;29){\Large 25 \%}%
%%%%%
\pswedge[fillstyle=solid,fillcolor=gray,hatchcolor=gray](0.05;50){2}{42}{58}
\rput*(1.2;50){\Large 16 \%}
%%%%
\pswedge[fillstyle=hlines,fillcolor=gray,hatchcolor=gray](0.05;70.5){2}{58}{83}
\rput*(1.2;71){\Large 25 \%}
%%%%
\pswedge[fillstyle=solid,fillcolor=gray,hatchcolor=gray](0.05;-8.5){2}{83}{100}
\rput*(1.2;92){\Large 17 \%}
\psdot(0,0)
\end{pspicture}
\end{document}