如何在 TikZ 環境中的軸位置嵌入外部影像?

如何在 TikZ 環境中的軸位置嵌入外部影像?

如何在 tikzpicture 環境中嵌入外部映像?我可以看到\includegraphics可以在 Ti 中使用kZ 環境使用\node.

但是,我的tikzpicture包含一個axis環境(來自在 matlab 中生成的圖表並轉換為 TikZ),我希望根據該軸而不是圖片位置來定位節點。

有可能做到嗎?

這是我的程式碼的簡化版本。現在要定位我正在使用的圖形\node[inner sep=0pt] (test) at (14,10),根據我的理解,它指的是圖形位置,而不是位置axis

\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}
]
\addplot3 [color=gray]
 table[row sep=crcr] {%
0   0   0\\
4   0.03    17\\
};
\node[inner sep=0pt] (test) at (14,10)
    {\includegraphics[width=.25\textwidth]{harmonicfit}};
\end{axis}
\end{tikzpicture}%

相關內容