[pstricks] Big arrow with text inside

Herbert Voss Herbert.Voss at FU-Berlin.DE
Thu Mar 12 17:45:52 CET 2009


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}




More information about the PSTricks mailing list