Graphics, Figures & TablesPSTricks | Unexpected Chart Output

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

PSTricks | Unexpected Chart Output

Post by svend_tveskaeg »

Hi all.

Consider the following MWE:

Code: Select all

\documentclass{article}

\usepackage{auto-pst-pdf,pstricks-add}

\begin{document}

\begin{figure}
 \centering
  \begin{pspicture}(8,8)
   \psset{unit=1.5cm,nodesepA=5pt,nodesepB=-10pt}
    \psChart[userColor={red!60,green!60,yellow!60,purple!60,blue!60},chartNodeO=1.25,shadow=true,shadowsize=5pt]{91.810, 214.995, 115.457, 59.404, 19.033}{}{3}
    \rput(psChartI1){$0$--$19$~years}
    \ncline{psChartO1}{psChart1}
    \nput{0}{psChartO1}{91810}
    \rput(psChartI2){$20$--$39$~years}
    \ncline{psChartO2}{psChart2}
    \nput{90}{psChartO2}{214995}
    \rput(psChartI3){$40$--$59$~years}
    \ncline{psChartO3}{psChart3}
    \nput{-90}{psChartO3}{115457}
    \rput(psChartI4){$60$--$79$~years}
    \ncline{psChartO4}{psChart4}
    \nput{0}{psChartO4}{59404}
    \rput(psChartI5){$> 79$~years}
    \ncline{psChartO5}{psChart5}
    \nput{0}{psChartO5}{19033}
  \end{pspicture}
\end{figure}

\end{document}
This is all good but when I change

Code: Select all

91.810, 214.995, 115.457, 59.404, 19.033
to

Code: Select all

91810, 214995, 115457, 59404, 19033
the entire chart is the last colour (blue in this case) the all the labels are cluttered at the left side of the chart.

What is going on here? :?

Thank you in advance!
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

PSTricks | Unexpected Chart Output

Post by localghost »

Works fine for me (see attachment). Perhaps a matter of outdated packages. After adding \listfiles as very first command to your example I get the below list of used files in the log file.

Code: Select all

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
auto-pst-pdf.sty    2009/04/26 v0.6 Wrapper for pst-pdf
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
 xkeyval.sty    2008/08/13 v2.6a package option processing (HA)
 xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)
ifplatform.sty    2010/10/22 v0.4 Testing for the operating system
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
catchfile.sty    2011/03/01 v1.6 Catch the contents of a file (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
    vtmp.w18
 pst-pdf.sty    2008/10/09 v1.1v PS graphics for pdfLaTeX (RN,HjG)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
pstricks.sty    2011/10/31 v0.52 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex    2012/03/11 v2.27 `PSTricks' (tvz,hv)
pst-xkey.tex    2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
  pst-fp.tex    2012/03/11 v2.27 `PST-fp' (hv)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
 preview.sty    2010/02/14 11.86 (AUCTeX/preview-latex)
   dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
 environ.sty    2008/06/18 v0.2 A new way to define environments
pstricks-add.sty    2010/02/11 v. 0.14 package wrapper for pstricks-add.tex (hv)
pst-plot.sty    2011/04/13 package wrapper for pst-plot.tex (hv)
pst-xkey.sty    2005/11/25 v1.6 package wrapper for pst-xkey.tex (HA)
 multido.sty    2004/05/17 package wrapper for PSTricks `multido.tex', (HV/RN)
 multido.tex    2010/05/14 v1.42 `multido' (tvz,hv)
pst-plot.tex    2012/05/03 1.42 `pst-plot' (tvz,hv)
pst-node.sty    2010/04/22 package wrapper for pst-node.tex
pst-node.tex    2012/02/12 1.22 `pst-node' (tvz)
  pst-3d.sty    2009/07/28 package wrapper for pst-3d.tex (hv)
  pst-3d.tex    2010/02/14 v1.11 `PST-3d' (hv)
pst-math.sty    2009/01/20 package wrapper for PSTricks pst-math.tex
pstricks-add.tex    2011/12/11 v3.55 `PSTricks-add' (hv)
supp-pdf.mkii
vtmp-pics.pdf    Graphic file (type pdf)
 ***********
Attachments
The output obtain from provided example.
The output obtain from provided example.
PSTricks-Chart.png (32.24 KiB) Viewed 2259 times
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

PSTricks | Unexpected Chart Output

Post by svend_tveskaeg »

Hmmm... The versions of my packages are equivalent to yours; I updated my TeX Live 2012 distribution using

Code: Select all

tlmgr update --all --self
this afternoon.

Unlike before, I now encounter an error:

Code: Select all

! Dimension too large.
<recently read> \p@ 
                    
l.13 ...{91810, 214995, 115457, 59404, 19033}{}{3}
(I cannot figure out why I encounter an error message all of a sudden, since I did not before, but never mind that.)

I guess the problem has something to do with the numbers begin too large. Is an upper limit for the input numbers mentioned in the pstricks-add documentation? (I have not been able to find anything regarding this.)

P.S. Both times I compiled using

Code: Select all

pdflatex -shell-escape test3.tex
P.P.S. The log file (after adding \listfiles) is attached.
Attachments
test3.log
Log file.
(9.89 KiB) Downloaded 252 times
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
Post Reply