[pstricks] problem grid and axis with small units

xlogo at free.fr xlogo at free.fr
Mon Aug 13 10:16:12 CEST 2007


Many thanks for your answer Herbert,
It appears when xunits or yunits are less than 0.15 pt(approx), precision
problems appears.
Ok, I will try with better units.

bye and many thanks for your work


> Am Montag, 6. August 2007 22:16 schrieb Loïc:
>
> > \documentclass[10pt]{article}
> > \usepackage{pstricks,pstricks-add,pst-math,pst-xkey,geometry}
> > \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}
> \usepackage{pstricks-add}
> \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
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>





More information about the PSTricks mailing list