2

This is more or less a follow-up question to the question PSTricks: ugly pie chart by PinkFloyd.

Consider the following code:

\documentclass{article}

\usepackage{pstricks-add}
\usepackage{siunitx}

\begin{document}

\begin{figure}[htbp]
\centering
 \psset{
   unit = 2.9,
   nodesepA = 5pt,
   nodesepB = -10pt
 }
  \begin{pspicture}(-1.0,-1.37)(1.5,1.4)
    \psChart[
      userColor = {red!60,green!60,blue!60},
      chartNodeO = 1.25,
      shadow = true,
      shadowsize = 5pt,
      linestyle = none
    ]{54, 594, 890}{}{1}
    \rput(psChartI1){\SI{54}{\tonne}}
    \ncline{psChartO1}{psChart1}
    \nput{0}{psChartO1}{F{\o}r}
    \rput(psChartI2){\SI{594}{\tonne}}
    \ncline{psChartO2}{psChart2}
    \nput{90}{psChartO2}{Under}
    \rput(psChartI3){\SI{890}{\tonne}}
    \ncline{psChartO3}{psChart3}
    \nput{-90}{psChartO3}{Efter}
  \end{pspicture}
\end{figure}

\end{document}

output

When I correct the overlapping of the pie charts by invoking linestyle=none, togethter with the shadow=true option, there is a white border between the piechart and its shadow, I would like to get rit of. How do I do this?

3

Setting linewidth=0 is enough. linestyle=none is not necessary.

\documentclass[pstricks,border=12pt]{standalone}

\usepackage{pstricks-add}
\usepackage{siunitx}

 \psset
{
    unit = 2.9,
    nodesepA = 5pt,
    nodesepB = -10pt,
}

\begin{document}
    \begin{pspicture}(-1.0,-1.37)(1.5,1.4)
    \psChart
    [
      userColor = {red!60,green!60,blue!60},
      chartNodeO = 1.25,
      shadow = true,
      linewidth=0,
      shadowsize = 5pt,
    ]{54, 594, 890}{}{1}
    \rput(psChartI1){\SI{54}{\tonne}}
    \ncline{psChartO1}{psChart1}
    \nput{0}{psChartO1}{F{\o}r}
    \rput(psChartI2){\SI{594}{\tonne}}
    \ncline{psChartO2}{psChart2}
    \nput{90}{psChartO2}{Under}
    \rput(psChartI3){\SI{890}{\tonne}}
    \ncline{psChartO3}{psChart3}
    \nput{-90}{psChartO3}{Efter}
    \end{pspicture}
\end{document}

enter image description here

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.