I was trying to define an axis environment within a node. Upon adding multiple addplots I observed a shift in the axis position, shifting further for more addplots. Below is an example to recreate the problem:
\documentclass{article}
\usepackage{tikz,pgfplots}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}
%
\node at (0.0,0.0) (A) {x};%
\node at (0.0,2.0) (B) {x};%
\node at (0.0,4.0) (C) {x};%
%
\node at (A) {%
\begin{axis}[domain=1:2,width=40mm,height=30mm]%
\addplot {sin(deg(x))};%
\end{axis}%
};%
%
\node at (B) {%
\begin{axis}[domain=1:2,width=40mm,height=30mm]%
\addplot {sin(deg(x))};%
\addplot {sin(deg(x))};%
\end{axis}%
};%
%
\node at (C) {%
\begin{axis}[domain=1:2,width=40mm,height=30mm]%
\addplot {sin(deg(x))};%
\addplot {sin(deg(x))};%
\addplot {sin(deg(x))};%
\end{axis}%
};%
%
\end{tikzpicture}
\end{figure}
\end{document}
A similar problem was discussed here: Why does \addplot shift my graph of a \pgfmathdeclarefunction function to the right?, which is the reason why I added the % signs at the end of each line but this does not solve the shifting issue here.



axisinside anode? If it's just aligning them you can align them withtabular, aTiKZmatrixor agroupplot. All of them explained in "4.19 Alignment options" – Ignasi May 13 '15 at 08:54