Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.
share|improve this question

1 Answer 1

up vote 2 down vote accepted
\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})$}
share|improve this answer
    
Thanks, how about the labels of x- and y-axis? Can they be rotated too be rotatebox? –  BillyJean Oct 8 '13 at 19:05
    
xLabelsRot does not work. And the manual contains so many typos in capitalization. –  stalking is prohibited Oct 8 '13 at 19:07
    
@PGFTricks So do you suggest that I use rput for the axes-labels and rotate manually? –  BillyJean Oct 8 '13 at 19:11
1  
@BillyJean: see edited answer –  Herbert Oct 8 '13 at 19:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.