[pstricks] Big arrow with text inside

David Arnold dwarnold45 at suddenlink.net
Thu Mar 12 18:02:05 CET 2009


Wow!

Do you explain this stuff in a chapter in your upcoming book?

D.

On Mar 12, 2009, at 9:45 AM, Herbert Voss wrote:

David Arnold schrieb:

> I'd like to create a large arrow with shaded fill and solid border.
> Inside the arrow I'd like to center the text "Increasing", with the
> arrow pointing to the right. I'd like to be able to translate this
> arrow to a desired position. Similarly, I'd like a left pointed arrow
> with the word "decreasing" inside.
>
> Any suggestions?

a simple one ...

Herbert

\documentclass[12pt]{article}

\usepackage{pstricks}
\SpecialCoor
\makeatletter
\def\bigArrow{\pst at object{bigArrow}}
\def\bigArrow at i(#1,#2){%
   \begin at ClosedObj
   \pspolygon(#1,0)(#1,0.4)(!#2 0.75 sub 0.4)
     (!#2 0.75 sub 0.8)(#2,0)(!#2 0.75 sub -0.8)
     (!#2 0.75 sub -0.4)(#1,-0.4)
   \end at ClosedObj%
   \ignorespaces}
\makeatother

\begin{document}
\begin{pspicture}[showgrid=true](-3.5,-3.5)(3.5,3.5)
   \bigArrow(-1,3)\rput(1,0){Increasing}
   \rput(0,1.5){\bigArrow[fillcolor=red!40,fillstyle=solid](-1,3)}
   \rput(1,1.5){Increasing}
   \rput{180}(2,-1.5){\bigArrow[fillcolor=blue!40,fillstyle=solid] 
(-1,3)}
   \rput(1,-1.5){Decreasing}
   \end{pspicture}

\end{document}


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



More information about the PSTricks mailing list