4

I am having some issues with axes in PSTricks. Here is my current MWE,

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-node, pst-plot}
\psset
{
    unit=0.1cm,
}



\usepackage{siunitx}
\begin{document}
\begin{pspicture}[showgrid=false](-5.0, -23)(110.0, 20.0)
\psaxes[Dx=10,Dy=10,linewidth=1pt,ticksize=2pt]{->}(0,0)(0.0,-23)(105,20)[$z (\si{\milli\meter})$, 0][$$,90]
\end{pspicture}
\end{document}

I have two issues:

  1. I want to rotate all tick-labels, both on the x- and y-axis (including the x-axis label) by 90 degrees CCW.
  2. I want for the two axis to meet at the bottom of the y-axis instead of (0, 0), as it is now.

1 Answer 1

2
\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-node, pst-plot}
\psset{unit=0.1cm}
\usepackage{siunitx}
\makeatletter
\def\pst@@@hlabel#1{\rotatebox{90}{#1}}
\def\pst@@@vlabel#1{\rotatebox{90}{#1}}
\makeatother
\begin{document}

\begin{pspicture}[showgrid=false](-5.0, -28)(115.0, 20.0)
\psaxes[Dx=10,Dy=10,linewidth=1pt,ticksize=2pt,
        Oy=-23]{->}(0.0,-23)(105,20)[$z (\si{\milli\meter})$, 0][,0]
\end{pspicture}

\end{document}

enter image description here

if you want to rotate the axes labels too, then use (shown for x):

\psaxes[Dx=10,Dy=10,linewidth=1pt,ticksize=2pt,
        Oy=-23]{->}(0.0,-23)(105,20)
\uput[0]{90}(105,-23){$z (\si{\milli\meter})$}
4
  • Thanks, how about the labels of x- and y-axis? Can they be rotated too be rotatebox?
    – BillyJean
    Oct 8, 2013 at 19:05
  • xLabelsRot does not work. And the manual contains so many typos in capitalization. Oct 8, 2013 at 19:07
  • @PGFTricks So do you suggest that I use rput for the axes-labels and rotate manually?
    – BillyJean
    Oct 8, 2013 at 19:11
  • 1
    @BillyJean: see edited answer
    – user2478
    Oct 8, 2013 at 19:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .