[pstricks] Custom tick label and tick interval

Herbert Voss LaTeX at ZEDAT.FU-Berlin.DE
Wed Mar 7 17:12:55 CET 2007


erratic schrieb:
> Great, Martijn, the 'unit' parameter fixed the size issue. Thank you!
>
> So are you suggesting that I hide the labels, set dx=5 and use \rput for
> the
> 0,5,10,15 labels on the x axis? I was hoping there would be an easier way.
>
>         \psset{unit=8mm, showpoints=false}
>         \begin{pspicture}(0,0)(17,9)
>
> \psaxes[dx=5,linewidth=2pt,labels=none,ticks=x,tickstyle=bottom](17,7)
>             \psline[linestyle=dashed](0,0)(16,7)
>             \psline (5,0)(16,2)
>                 \rput(0,-0.5){0}
>                 \rput(5,-0.5){5}
>                 \rput(10,-0.5){10}
>                 \rput(15,-0.5){15}
>                 \rput(16,-0.5){Years}
>                 \rput(1,7.5){Number}
>         \end{pspicture}
>
> The code above gives me the exact result I want. Is there an easier way to
> achieve that look?

\documentclass{minimal}
\usepackage{pstricks,pst-plot}

\begin{document}

\psset{yunit=0.5}
\begin{pspicture}(0,0)(17,9)
  \psaxes[linewidth=2pt,labels=x,
     ticks=x,tickstyle=bottom,dx=5,Dx=5](17,9)
  \psline[linestyle=dashed](0,0)(16,9)
  \psline (5,0)(16,2)
\end{pspicture}

\end{document}

Herbert




More information about the PSTricks mailing list