I want to get consistent arrow tips for
- Arrows in
TikZdrawings pgfplotsaxes- Arrows used to annotate features in plots produced with
pgfplots
My solution works only for 1 and 3, as demonstrated by this MWE:
\documentclass{standalone}
\usepackage{pgfplots}
\usetikzlibrary{arrows.meta}
\pgfplotsset{compat=newest}
% does work for tikz arrows
% does work for pgfplots annotation arrows
% does NOT work for pgfplots axes
\tikzset{myarrow/.style={>={Computer Modern Rightarrow[scale length=1.5]}}}
\begin{document}
\begin{tikzpicture}
\draw[->,myarrow] (0,0) -- (0,3);
\draw[<-,myarrow] (1,0) -- (1,3);
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[width=4.0cm,height=4.0cm,xmin=0,xmax=1,ymin=0,ymax=1,
xticklabels = {},yticklabels={},axis lines = middle,
axis line style={myarrow}]
\addplot {x^2};
\draw[color=red ,->,myarrow] (axis cs:0.0,0.4) -- (1.0,0.4);
\draw[color=orange,<-,myarrow] (axis cs:0.0,0.6) -- (1.0,0.6);
\end{axis}
\end{tikzpicture}
\end{document}
which results in
Note that the tips of the axes do not correspond to those of the other arrows. How can I define my arrow tip so it works for all three situations?
Notes:


