Consider the following example:
\documentclass{article}
\usepackage{pst-plot}
\begin{document}
\savedata{\data}[{1999,6276},{2000,6827},{2001,7783},{2002,9819}]
\psset{xAxisLabel={Year},yAxisLabel={Ocapi}}
\begin{psgraph}[Ox=1999,xlabelOffset=0.5,Dy=2000]{->}(1999,0)(2004,13000){13.5cm}{8.1cm}
\dataplot[plotstyle=dots,dotstyle=o,fillcolor=red]{\data}
\end{psgraph}
\end{document}
I tried to re-use this answer from Herbert but it is not working. The error is
! Dimension too large.
<recently read> \pst@xunit
l.8 ...000]{->}(1999,0)(2004,13000){13.5cm}{8.1cm}
If I can get a solution and an explanation as to why it is not working, I would be greatful.
Best Answer
Run with any compiler:
(with a wink and nod to Herbert)
With
pst-plot
, you need to shift your coordinates manually before you can plot them. You do this by addingwhich subtracts 1999 from all your x coordinates. If you then adjust your plot limits to range from x=0 to 5 and use
\listplot
instead of\dataplot
, you get the following: