# [pstricks] problem grid and axis with small units

Herbert Voss LaTeX at zedat.fu-berlin.de
Sun Aug 12 22:47:21 CEST 2007

Am Montag, 6. August 2007 22:16 schrieb Loïc:

> \documentclass[10pt]{article}
> \geometry{a4paper,lmargin=1cm}
> \begin{document}
> \psset{xunit=1.3333333333333333cm,yunit=2.666666666666666cm}
> \begin{pspicture*}(-10,-5)(5,2.5)
> \psgrid[subgriddiv=0,gridlabels=0,gridcolor=lightgray](0,0)(-10,-5)(5,2.5)
> \psset{xunit=0.00013333333333333333cm,yunit=0.00013333333333333333cm,linewi
>dth=0.8pt,arrowsize=3pt
>
> 2,arrowinset=0.25}
> \psaxes[Dx=10000,Dy=20000,ticksize=-2pt
> 0,subticks=2]{->}(0,0)(-100000,-100000)(50000,50000)
> \end{pspicture*}
> \end{document}
>
>
> you will see that the grid is not exactly on the ticks of axis. Is it a
> pstricks problem of computation?

yes, use smaller units

\documentclass{minimal}
\parindent=0pt
\begin{document}

\psset{xunit=38.4267pt,yunit=76.8533pt}
\begin{pspicture*}(-10,-5)(5,2.5)
\psgrid[subgriddiv=0,gridlabels=0,gridcolor=lightgray](0,0)(-10,-5)(5,2.5)
\psset{linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\psaxes[Dx=10000,Dy=20000,dx=\psxunit,dy=\psyunit,ticksize=-2pt
0,subticks=2]{->}(0,0)(-10,-10)(5,5)
\end{pspicture*}

\end{document}

Herbert