[pstricks] Dimension too large?

Michael Sharpe msharpe at ucsd.edu
Thu Jun 25 01:49:08 CEST 2009


David,

PSTricks stores coordinates in dimension registers, which have a  
maximum possible value of about 19ft. If any coordinate in your  
picture would be that distance from the true origin, you will get that  
error. (It is very common.) The fix is to use \psbarscale to rescale  
the y values.

\begin{filecontents*}{HumboldtPopulation.csv}
7322,26672,78142,16194
\end{filecontents*}

\psset{xunit=0.4in,yunit=0.0025in}
\begin{pspicture}(-2,0)(5,800)
\psframe[fillstyle=solid,fillcolor=black!10,linestyle=solid](0,0)(5,800)
\psaxes[yticksize=0 5,ticks=y,labels=y,Dy=10000](0,0)(0,0)(5,800)
\readpsbardata[header=false]{\data}{HumboldtPopulation.csv}
\psbarscale(.01){}
\psbarchart[barstyle=blue]{\data}
\rput{90}(-1.25,400){Humboldt Population}
\end{pspicture}


On Jun 24, 2009, at 4:13 PM, David Arnold wrote:

> All,
>
> This:
>
> \documentclass{article}
> \usepackage{amsmath}
> \usepackage{pst-bar}
> \usepackage{pstricks-add}
> \usepackage{filecontents}
> \begin{document}
>
> \begin{filecontents*}{HumboldtPopulation.csv}
> 7322,26672,78142,16194
> \end{filecontents*}
>
> \begin{center}
> \psset{xunit=0.4in,yunit=0.000025in}
> \begin{pspicture}(-2,0)(5,80000)
> \psframe[fillstyle=solid,fillcolor=black!10,linestyle=solid](0,0) 
> (5,80000)
> \psaxes[yticksize=0 5,ticks=y,labels=y,Dy=10000](0,0)(0,0)(5,80000)
> \readpsbardata[header=false]{\data}{HumboldtPopulation.csv}
> \psbarchart[barstyle=blue]{\data}
> \rput{90}(-1.25,40000){Humboldt Population}
> \end{pspicture}
> \end{center}
>
> \end{document}
>
> Produces this error:
>
> ! Dimension too large.
> <to be read again>
>                    =
> l.17 \readpsbardata
>                    [header=false]{\data}{HumboldtPopulation.csv}
> ?
>
>
> Anyone know what this means? Workaround?
>
> David.
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks



More information about the PSTricks mailing list