Graphics, Figures & TablesAxes grid on top of the pin when using gnuplot

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mgulin
Posts: 18
Joined: Thu May 31, 2012 7:16 pm

Axes grid on top of the pin when using gnuplot

Post by mgulin »

Hi all!

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).
problem.png
problem.png (12.89 KiB) Viewed 3158 times
Here is the code I used:

Code: Select all

Code, edit and compile here:
\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}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Please find attached the file data.txt.

Best,
Marko.
Attachments
data.zip
(39.5 KiB) Downloaded 142 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

mgulin
Posts: 18
Joined: Thu May 31, 2012 7:16 pm

Axes grid on top of the pin when using gnuplot

Post by mgulin »

I finally managed to find a solution.

Just add the command set layers inside axis options.

Best,
Marko.
Post Reply