[pstricks] Errors: Dimension Too Large.

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sat May 18 08:31:31 CEST 2013


Am 18.05.2013 04:38, schrieb Yonggang Hu:
> hello,  two problems:
> 1) I always encounter an error message with "Dimension too large" if the
> input data is relative large ,  even for the given example on the web
> http://tug.org/PSTricks/pst-plot/listplot1.tex. My system is Miktex, and
> I have updated for the latest one.  Where can I find a document
> descripting this problem in detail?

use it this way:

\begin{filecontents*}{tu.total}
1 55808
2 31989
3 24884
4 22572
5 19718
6 17792
7 19529
8 17482
9 15658
10 18048
11 19132
12 19578
13 16152
14 16303
15 20265
16 24822
17 15240
18 19434
19 18585
20 19865
21 22418
22 23840
23 21704
24 39401
\end{filecontents*}
%
\documentclass[a4paper,12pt]{report}
\usepackage{pstricks,pstricks-add}

\begin{document}
\readdata{\mydata}{tu.total}
\psset{llx=-1cm,lly=-0.75cm}
\pstScalePoints(1,1){}{1e4 div}
\psgraph[ylabelFactor=\cdot10^4,dx=5\psxunit,Dx=5]%
     {->}(0,0)(25,6){0.375\textwidth}{0.375\textwidth}
   \listplot[showpoints=true, linecolor=red, linewidth=1pt]{\mydata}
\endpsgraph

\end{document}


> 2) I want to plot the data with following forms into a cureve:
>
> 2013/05/01 10:21:15   45
> 2013/05/01 11:24:41   13
> ... ...
>
> An example data file can be found in the attachments:  data.xls.  How?

\documentclass{article}
\usepackage{pst-plot}
\makeatletter
\newcounter{xVal}\setcounter{xVal}{0}
\def\psSpecialPlot{\pst at object{psSpecialPlot}}
\def\psSpecialPlot at i#1{\begin at SpecialObj\expandafter\psSpecialPlot at ii#1}
\def\psSpecialPlot at ii #1{\psSpecialPlot at iii#1}
\def\psSpecialPlot at iii#1 #2 #3 #4 #5 #6 {%
   \stepcounter{xVal}
   \psdot(\arabic{xVal},#6)%
   \@ifnextchar D{\psSpecialPlot at iii}{\end at SpecialObj}%
}
\makeatother

\begin{document}

\readdata{\data}{listplot3.data}
\data%% shows how the data is _internally_ represented.

\bigskip
\psset{llx=-1cm,lly=-1cm,mathLabel=false}
\begin{psgraph}[Dx=5,Dy=5]{->}(0,0)(20,20){10cm}{8cm}
   \psSpecialPlot[dotsize=5pt]{\data}
\end{psgraph}

\end{document}

You can write the values for the x axis as #2 (the date) or #4 (time)

Herbert


More information about the PSTricks mailing list