[pstricks] psaxes ticksize

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Sun Jun 19 22:57:08 CEST 2005


Jean-Claude Dehaes wrote:
> I have a problem with psaxes. When I put xticksize=-0.02 0.1 in the option list, the x-labels appears well below the x-axes. Can somebody help me. I made probably a mistake but I can not find it.

I suppose it is a bug, but I have to dig deeper here.
A workaround is attached. I also changed the code a bit

Herbert


\documentclass{article}
\usepackage{pstricks-add}

\listfiles
\makeatletter
\def\pst@@hlabels{%
   \pst at dimm=-\pst at xticksizeA\advance\pst at dimm by \pslabelsep%
   \vbox to\z@{%
     \ifdim\pst at dimd>\z@\vskip\pst at dimm\else\vss\fi%
     \ifnum\pst at cnta<\z@\pst at dimb=-\pst at dimb\fi%
     \hbox to\z@{%
       \ifshoworigin\hbox to \z@{\hss\pst@@@hlabel{\psk at Ox}\hss}\fi%
       \mmultido{\n=\psk at Ox+\psk at Dx}{\pst at cnta}{%
         \hskip\pst at dimb\hbox to \z@{\hss\pst@@@hlabel{\n}\hss}%
       }\hss%
     }%
     \ifdim\pst at dimd>\z@\vss\else\vskip\pst at dimm\fi%
}}%
\makeatother
\begin{document}

\pstVerb{/gravity {10} def /mass {0.5} def /kres {700} def}
\def\pshlabel#1{{\scriptsize\itshape#1}}
\def\psvlabel#1{{\scriptsize\itshape#1}}
\psset{xunit=2.50cm,yunit=.50cm}
\begin{pspicture}(-3,-2)(3,10)
\psaxes[Dx=0.5,Dy=.2,dy=2,Oy=0,xticksize=-2 10](0,0)(-2,-2)(2,10)
\psplot[linewidth=1.5pt,linecolor=red]{-2}{0}{%
    x 100 div gravity mul mass mul kres 2 div x 100 div dup mul mul add 
100 mul}
\psplot[linewidth=1.5pt,linecolor=red]{0}{2}{x 100 div gravity mul mass 
mul 100 mul}
\end{pspicture}
\end{document}


-- 
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes




More information about the PSTricks mailing list