[pstricks] psgrid and psaxes

Herbert Voss LaTeX at zedat.fu-berlin.de
Mon May 30 17:42:43 CEST 2005


Poul Riis wrote:

> I'm not certain that I use psgrid and psaxes in the right way when the
> origin is not at (0,0).
> 
> The following example works but is it the proper way to handle the units
> and the offset?
> At least, it's not very convenient to have different meanings of xunit and
> yunit and different meanings of the parameters of psgrid and psaxes.
> Furthermore, tickstyle=bottom seems to have no effect. Why?

do not use pstricks-add ... ;-)

> \begin{document}

please give full working examples

> \psset{xunit=1mm,yunit=1mm}
> \pspicture(-10,-10)(100,100)
> \psgrid[gridlabelcolor=white,gridcolor=green,subgriddiv=0,Ox=10,xunit=10,yunit=10](1,2)(10,10)
> \psaxes[tickstyle=bottom,tickcolor=red,Ox=10,Oy=20,Dx=10,Dy=10]{->}(10,20)(100,100)
> \psplot[linecolor=blue,plotpoints=200]{10}{100}{x 3.14159 div 180 mul sin
> 2 add 20 mul}
> \endpspicture
> \end{document}

not really different to your example

\documentclass {article}

\usepackage{pstricks-add}

\begin{document}

\psset{unit=1mm}
\pspicture(5,10)(100,100)
\psframe[linecolor=green](10,20)(100,100)
\psaxes[tickcolor=green,yticksize=0 90,xticksize=0 80,%
         Ox=10,Oy=20,Dx=10,Dy=10]{->}(10,20)(100,100)
\psplot[linecolor=blue,plotpoints=200]{10}{100}{x RadtoDeg sin 2 add 20 mul}
\endpspicture

\end{document}


Herbert




More information about the PSTricks mailing list