27

Is there a simple way to increase the size of an arrow tip using something like:

\tikzset{myptr/.style=->, ????}

without designing a new arrow style from scratch?

MattAllegro
  • 6,455
  • 5
  • 45
  • 52
Tsf
  • 1,339
  • 5
  • 17
  • 29

2 Answers2

35

One solution, very quick, to just scale the arrow head is number %2 in the following:

\documentclass[multi=false,tikz,border=2mm]{standalone}
\usetikzlibrary{arrows,decorations.markings}

\begin{document}

\begin{tikzpicture}
%1
\draw [->,>=stealth] (0,.5) -- (2,.5);
%2
\draw [decoration={markings,mark=at position 1 with
    {\arrow[scale=3,>=stealth]{>}}},postaction={decorate}] (0,0) -- (2,0);
\end{tikzpicture}

\end{document}

This produces:

enter image description here

(sorry for excessive zoom).

Much more in the answers to this question and in this answer, that I used as a source.

Addendum

\tikzset approach. This code:

\documentclass[multi=false,tikz,border=2mm]{standalone}
\usetikzlibrary{arrows,decorations.markings}

\begin{document}

\begin{tikzpicture}
\tikzset{myptr/.style={decoration={markings,mark=at position 1 with %
    {\arrow[scale=3,>=stealth]{>}}},postaction={decorate}}}
%1
\draw [->,>=stealth] (0,.5) -- (2,.5);
%2
\draw [myptr] (0,0) -- (2,0);
\end{tikzpicture}

\end{document}

produces the same output as the above one (source: PGF Manual, section 2.8).

Obviously you can use -Latex instead of stealth.

MattAllegro
  • 6,455
  • 5
  • 45
  • 52
  • 4
    My original definition is \tikzset{myptr/.style=-latex}. I would like to change it in some simple way because it is used in many places. I tried to change it to something like \tikzset{myptr/.style={-Latex[length=3mm,width=5mm]}} but it produced an error: "I do not know the key 'length[ ...". BTW my knowledge of tikz is rather poor. – Tsf Jun 21 '15 at 12:52
  • 1
    I prefer just those that use "myptr", if possible. – Tsf Jun 22 '15 at 17:12
  • 1
    is it possible to only to make arrow tips smaller? – alper Jul 31 '22 at 20:26
  • @alper try `\draw [-{Stealth[length=0.3mm, width=0.2mm]}] (0,0.5) -- (1,0.5);` as in my answer below...tune the values in millimeters and let me know ;) – MattAllegro Jul 31 '22 at 20:50
3

There is a new solution, see https://latexdraw.com/exploring-tikz-arrows/#t-1610685307397. It allows changing both the length and width of arrows:

\documentclass[border=1mm]{standalone}
 
\usepackage{tikz}
\usetikzlibrary{arrows.meta,arrows}


\begin{document}
 
\begin{tikzpicture}
  \draw [-{Stealth[length=3mm, width=2mm]}] (0,0.5) -- (1,0.5);
  \draw [-stealth] (0,0) -- (1,0);
\end{tikzpicture}
 
\end{document}

enter image description here

Tom
  • 834
  • 1
  • 14
  • 24