[pstricks] Controlling arrowhead linewidth

Martin Chicoine martin.chicoine at umontreal.ca
Fri Sep 1 18:32:01 CEST 2006


Great, thanks a lot!

Herbert Voss wrote:
> Martin Chicoine wrote:
> 
>>Is there a way to control the arrowhead linewidth? I'm specifically
>>interested in controlling the linewidth of end circles as in:
>>
>>        \psplot[arrows=o-o]{...}
>>
>>For such a curve, the end circle linewidth is the same as the curve
>>linewidth but I would like to control it independently.
> 

> not easy, look in pstrecks.tex for \psas at o and in
> pstricks.pro for EndDot.

just had a look and saw, that it is not a big deal:

\documentclass[10pt]{article}
\usepackage{pstricks,pst-xkey}
\makeatletter
\define at key[psset]{}{arrowLW}{\pst at getlength{#1}\psk at arrowLW}
\psset{arrowLW=0}
\def\psas at o{\psk at arrowLW\space dup 0 eq { pop }{ SLW } ifelse
   {\pst at usecolor\psfillcolor true} true \psk at dotsize \tx at EndDot }
\makeatother

\begin{document}

\vspace*{3cm}
\psset{linewidth=4pt,arrows=o-o}

\psline[arrowscale=5](0,2)(5,2)%
\psline[arrowscale=5,arrowLW=.5pt](0,0.5)(5,0.5)%
\psline(5,0)

\end{document}

Herbert


_______________________________________________
pstricks mailing list
pstricks at tug.org
http://tug.org/mailman/listinfo/pstricks




More information about the PSTricks mailing list