I would like to add some picture to an existing one that I annotate. For that, I do it in tikz with the command
\node[draw=black,anchor=south west] at (0,0.4){\includegraphics{ex.png}};
Note that I added the black rectangle only for clarity, in order to see what are approximately the limits of the figure. This is removed in my final thing. Now, as you can see, the figure looks bad
I'm wondering if it's possible to crop the figure around these dashes lines, in order to be able to see the rest of the picture.
Here is the code I use to generate this image :
\documentclass{standalone}
\usepackage{graphicx} %Manage images of different formats
\usepackage{tikz} % drawing
\begin{document}
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0,0) {\includegraphics[width=0.9\textwidth]{NuclideMap2.png}};
\begin{scope}[x={(image.south east)},y={(image.north west)}]
\draw[->] (0.014,0) -- (1,0);
\draw (1,0) node[anchor= west]{$N$};
\draw[->] (0,0.02) -- (0,1);
\draw (0,1) node[anchor=north west]{$Z$};
\draw[dashed] (0.014,0.02) -- (0.6388,0.95) node[anchor=north west]{$N=Z$};
\node[draw=black,anchor=south west] at (0.01,0.4){\includegraphics[width=0.35\textwidth]{ex.png}};
\draw[thick,dashed] (0.2,0.35) -- (0.45,0.85);
\draw[thick,dashed] (0.005,0.45) -- (0.08,0.98);
\end{scope}
\end{tikzpicture}
\end{document}
\clip <closed path>
3. put your node with the pic. 4. close the scope.