I've encountered a strange behaviour when using a contour gnuplot, where the axes grid is on top of the pin (please see the image below).
Here is the code I used:
Code: Select all
\documentclass[10pt]{IEEEtran}
\usepackage{pgfplots}
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment[{[]}]{tikzpicture}
\pgfplotsset{%
compat=newest,
width=0.85\columnwidth,
height=3.15cm,
scale only axis,
grid=both,
grid style={dashed,gray},
grid style={on layer=axis background},
y label style={at={(-0.075,0.5)}},
}
\tikzset{small dot/.style={fill=black, circle,scale=0.25}}
\tikzset{every pin/.style={draw=black, fill=yellow!10, fill opacity=1}}
\begin{document}
\begin{tikzpicture}[scale=1]
\begin{axis}[
xlabel={},
ylabel={},
xmin=0,
xmax=400,
xtick={0,50,...,400},
ymin=1,
ymax=2,
ytick={1,1.2,...,2},
font=\footnotesize,
view={0}{90},
]
\addplot3 [contour gnuplot={number=90, labels=false}, mesh/ordering = y varies, mesh/rows=101, mesh/cols=101] file {data.txt} ;
\node[coordinate, small dot, pin=60:{$0.054$ W}] at (axis cs:229,1.3) {} ;
\end{axis}
\end{tikzpicture}
\end{document}
Best,
Marko.