I want to place a node on a plot using the pathway modifier: node[pos=0.5] {node text};. The pgfplots manual clearly describes how that is done, but my node doesn't appear. Could my scaling be a problem here (it is applied by the input filter style)?
\documentclass{article}
\usepackage[a2paper,landscape,margin=1cm]{geometry}
\usepackage{tikz,pgfplots}
\pgfplotsset{compat=1.5}
\pgfmathsetmacro{\smin}{4000}
\pgfmathsetmacro{\smax}{9200}
\pgfmathsetmacro{\hmin}{2000}
\pgfmathsetmacro{\hmax}{3900}
\pgfplotstableset{input filter/.style ={y expr=\thisrowno{1}/1e3}}
\begin{document}
\pagestyle{empty}
\noindent\begin{tikzpicture}
\begin{axis}[xmin=\smin,xmax=\smax,width=52cm,
ymin=\hmin,ymax=\hmax,height=38cm,
scale only axis,
major tick length={0pt},
minor tick length={0pt},
xticklabel={\pgfmathparse{\tick/1e3}\pgfmathresult},
yticklabel={\pgfmathparse{\tick}\pgfmathresult},
axis lines*=none
]
\addplot table[input filter] {
5575.75757575757575779 2010304.18052640024086
6311.11111111111111116 2284412.95212492412338
7886.86868686868686851 2900069.5315761277061
9200 3795110.22478821340428
} node[pos=0.5] {asdf};
\end{axis}
\end{tikzpicture}\\
\end{document}
I've also tried to place the node using the decorations.markings library:
\usetikzlibrary{decorations.markings}
\addplot[postaction={decorate},
decoration={markings,mark=at position 0.5 with \node {asdf};}
] table[input filter] {
5575.75757575757575779 2010304.18052640024086
6311.11111111111111116 2284412.95212492412338
7886.86868686868686851 2900069.5315761277061
9200 3795110.22478821340428
};
and the node didn't appear as well. Other position settings such as at position 1cm also didn't place a node on the plot.
\listfilesI get this log entry:Package: pgfplots 2011/07/29 v1.5 (git show 1.5-1-gcc2f2d2 )– Christoph Mar 1 '12 at 9:29pgfplots 2011/12/29 v1.5.1 (git show 1.5.1-4-g53e640f )– Jake Mar 1 '12 at 9:32pgfplotsand everything is fine, thank you! – Christoph Mar 1 '12 at 10:16