[pstricks] Re: plotting again..

Herbert Voss Herbert.Voss at gmx.net
Sun Jul 4 18:39:07 CEST 2004


David Rasmussen wrote:
> I am trying to plot some very big numbers:
> 
> \documentclass[a4paper,12pt]{report}
> \usepackage{pst-plot}
> \begin{document}
> 
> \readdata{\mydata}{nodes.total}
> \psset{xunit=0.6 cm,yunit=0.000000008 mm}
> \begin{pspicture}(25,1000000000)
> \psaxes[axesstyle=frame,Dx=1,Dy=1000000](25,1000000000)

such big numbers are a kind of crazy ... write at the axes
a unit like "in million" and divide the values first by
1 million (done by PSTricks)

and by the way:
while true {
   there is some documentation about psplot
}

Herbert



\begin{filecontents}{nodes.total}
1 99447169
2 110351058
3 123557238
4 138346129
5 145050826
6 160363212
7 174000394
8 183856559
9 189128691
10 197634845
11 213257357
12 216899512
13 230152738
14 224144907
15 247410024
16 261168438
17 252920343
18 326153799
19 319442110
20 310351522
21 381919943
22 438043888
23 357527766
24 603304997
\end{filecontents}

\documentclass[a4paper,12pt]{report}
\usepackage{pstricks}
\usepackage{pst-plot}

\makeatletter
\pst at def{ScalePoints}<%
   /y ED /x ED
   counttomark dup dup cvi eq not { exch pop } if
   /m exch def /n m 2 div cvi def
   n {
      y mul 1000000 div m 1 roll % <-- divide by 1 million
      x mul m 1 roll
      /m m 2 sub
      def } repeat>
\makeatother

\begin{document}

\readdata{\mydata}{nodes.total}
\psset{xunit=0.6cm,yunit=0.08mm}
\begin{pspicture}(25,1000)
   \psaxes[axesstyle=frame,Dy=100](25,1000)
   \listplot[showpoints=true]{\mydata}
   \rput{90}(-2.3,500){in million}
\end{pspicture}

\end{document}


-- 
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes




More information about the PSTricks mailing list