I would like to draw a pgfplots grid onto a 480x800 image. With the code below, I can see the grid has been plotted but the image doesn't show.
\documentclass{standalone}
\usepackage{tikz}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\def\fname{/media/sf_work/demo.png}
\begin{tikzpicture}
\begin{axis}[
grid = both,scale=.5,
width=480,
height=800,
, minor tick num=3
, grid style={draw=gray!10,line width=.1pt}
, major grid style={line width=0.5pt,draw=gray!50}
, axis line style={latex-latex}
, xticklabels = \empty
, yticklabels = \empty
, draw=blue!20
]
\node[] (image) at (axis cs:240,400) {\includegraphics[]{\fname}};
\end{axis}
\end{tikzpicture}
\end{document}


widthandlength(that should be lengths, so with a measurement unit) with the x and y axis ranges... – Rmano Jan 04 '24 at 18:10