# How can I embed an external image within the TikZ environment in the axis positions?

From How can I embed an external image within a tikzpicture environment? I can see that \includegraphics can be used within a TikZ environment using \node.

However, my tikzpicture includes an axis environment (from a plot generated in matlab and translated to TikZ) and I wish to position the node based on this axis rather than the picture position.

Is it possible to be done?

Here is simplified version of my code. Right now to position my figure I'm using \node[inner sep=0pt] (test) at (14,10), which from what I understand refers to the figure position, not the axis position.

\begin{tikzpicture}
\begin{axis}[%
xmin=0,
xmax=5,
tick align=outside,
xlabel={x},
ymin=-11,
ymax=0.5,
ylabel={y},
zmin=0,
zmax=20,
zlabel={z},
view={-57.4}{14.4},
axis background/.style={fill=white},
legend style={at={(1.03,1)}, anchor=north west, legend cell align=left, align=left, draw=white!15!black}
]

• Could you please provide an explicit example? Is your embedding picture a 3d axis in which you want to include an external graphics? Then you can just use the axis coordinates. (If you want to embed the picture in a 3d-like fashion, i.e. using orthographic projections, you could use the 3d library along with transform shape.) – marmot Feb 27 at 15:41