[pstricks] labelsep and rotated 'put'
Poul Riis
Poul.Riis at skolekom.dk
Sun Oct 16 14:22:03 CEST 2005
How can I in an elegant way add a line from the node to the label as at
node A in the example below? - And add this facility to my new command
'\nodewidthrotatedtext'?
Yours,
Poul Riis
\documentclass{article}
\usepackage{pst-node}
\usepackage{pst-plot}
\pagestyle{empty}
%\nodewithrotatedtext{x}{y}{labelsep}{rotangle}{text}
\newcommand{\nodewithrotatedtext}[5]{%
\cnode*(!#1 #2){2pt}{P}%
\nput[rot=#4,labelsep=#3]{#4}{P}{\psframebox{#5}}%
}
\begin{document}
\def\xA{0}
\def\xB{200}
\psset{xunit=0.2mm,yunit=1cm}
\begin{pspicture}(-5,-5)(400,5)
\psaxes[Dx=50,Dy=1,linewidth=1pt,labels=all,%
ticksize=-3pt 0]{->}(0,0)(-5,-0.5)(400,5)
\SpecialCoor%
\cnode*(!\xA\space 0){2pt}{A}%
\cnode*(!\xB\space 0){2pt}{B}%
\nput[rot=60,labelsep=1cm]{60}{A}{\psframebox{Rotated text at A}}
\pscustom{\rotate{60}\psline(0,0)(50,0)}
\nput[rot=-60,labelsep=1cm]{-60}{B}{Rotated text at B}
\nodewithrotatedtext{300}{0}{5mm}{30}{Rotated text at C}
\end{pspicture}
\end{document}
More information about the PSTricks
mailing list