# pgfplots: custom axis arrow head [duplicate]

I'm using this answer to make a bigger arrow head. I would like to use this new arrow head as my default arrow head (both in pgfplots axis and in tikz pictures). Here is a MWE:

\documentclass[tikz]{standalone}

\usepackage{pgfplots}
standard/.style={
axis lines=middle, axis line style=-triangle 45 % I WANT "big arrow" HERE
}
}

\usetikzlibrary{arrows,decorations.markings}
\tikzset{
big arrow/.style={
decoration={markings,mark=at position 1 with {\arrow[scale=2.5]{latex'}}},
postaction={decorate}},
>=triangle 45 % I ALSO WANT "big arrow" HERE
}

\begin{document}
\begin{tikzpicture}
% \draw [big arrow] (0,0) -- (0,5) node [left]{$y$};
% \draw [big arrow] (0,0) -- (5,0) node [right]{$x$};
\begin{axis}[standard, xmin=0, xmax=5, xlabel=$x$, ymin=0, ymax=5, ylabel=$y$]
\end{axis}
\end{tikzpicture}
\end{document}


In a pgfplot axis instead of having

axis line style=-triangle 45


I would like to have something like

axis line style=-big arrow


In a tikz picture, instead of the lines

% \draw [big arrow] (0,0) -- (0,5) node [left]{$y$};
% \draw [big arrow] (0,0) -- (5,0) node [right]{$x$};


I would like, for instance, to write

\draw [<->] (0,5) node [left]{$y$} |- (5,0)  node [right] {$x$};


and have the arrow head be "big arrow".

• What does axis line style=big arrow do? – Qrrbrbirlbel Oct 29 '13 at 0:24
• @Qrrbrbirlbel it compiles without errors but the axis lines are not shown and both the big arrow head and the default arrow head appear and overlap. – petobens Oct 29 '13 at 0:31
• The default arrow head can be hidden with setting axis line style={-, big arrow}. Why the line disappears though, I don’t know. The implementation seems tricky. Also >=big arrow will not work anyway, unless you define an arrow head big arrow. – Qrrbrbirlbel Oct 29 '13 at 0:45
• The axis lines are already drawn as a decoration, both decorations together do not seem to work. – Qrrbrbirlbel Oct 29 '13 at 0:53
• @Qrrbrbirlbel thanks. Is there another way to achieve what I want (define "big arrow") without using decorations? – petobens Oct 29 '13 at 1:41

I would suggest using the library of Luigi for genuine arrowheads in Is it possible to change the size of an arrowhead in TikZ/PGF? or what Jake proposed in the duplicate or to fix your current idea (which does not apply to other axis lines options)

\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9,
standard/.style={separate axis lines,
axis lines=middle, axis line style={-,big arrow} % I WANT "big arrow" HERE
}
}

\usetikzlibrary{arrows,decorations.markings}
\tikzset{
big arrow/.style={
decoration={markings,mark=at position 1 with {\arrow[scale=5]{latex'}}},
postaction={decorate,draw}},
>=triangle 45 % I ALSO WANT "big arrow" HERE
}

\begin{document}
\begin{tikzpicture}
% \draw [big arrow] (0,0) -- (0,5) node [left]{$y$};
% \draw [big arrow] (0,0) -- (5,0) node [right]{$x$};
\begin{axis}[standard, xmin=0, xmax=5, xlabel=$x$, ymin=0, ymax=5, ylabel=$y$]
\end{axis}
\end{tikzpicture}
\end{document}


For making this the default arrow head both in TikZ and pgfplots, you need to either use the CVS version of TikZ with the new arrows library or use Luigi's library for custom arrowheads. Decoration for default arrow head is not the way to go.

• I ended up using your (last) solution. Thanks – petobens Oct 29 '13 at 15:22