# Cannot shift plot in Tikz picture

I have nodes that are placed at specific positions in my Tikz picture, and I would like to put a plot next to it. To do this, I am using a shifted scope. However, when I change the shift values, nothing changes.

This is code with a simplified version of my problem:

\documentclass{article}

\usepackage{amsmath}
\usepackage{tikz}
\usepackage{pgfplots}

\begin{document}
\pagestyle{empty}

\begin{tikzpicture}

\node at (2.7, -3.6) {Test};

\begin{scope}[x=4,y=1cm, shift={(3,-3.6)}]
\tikz \draw[color=orange, domain=-2:2] plot (\x,{exp(-\x * \x)}) {};
\end{scope}

\end{tikzpicture}
\end{document}


Could you provide some guidance on how to fix this please?

Removing \tikz gets the job done :)

\documentclass{article}

\usepackage{amsmath}
\usepackage{tikz}
\usepackage{pgfplots}

\begin{document}
\pagestyle{empty}

\begin{tikzpicture}

\node at (2.7, -3.6) {Test};
\begin{scope}[x=4,y=1cm, shift={(3,-3.6)}]
\draw[color=orange, domain=-2:2] plot (\x,{exp(-\x * \x)}) {};
\end{scope}

\end{tikzpicture}
\end{document}


As @M. Al Jumaily already mentioned, the \tikz inside scope is incorrect (nesting tikz environments is always a bad idea).

Also, some of the packages in your preambel are not necessary (amsmath and pgfplots). Finally, one can avoid the scope environment. Therefore, I suggest the following simplification that makes the job you need.

## Code

\documentclass{article}

\usepackage{tikz}

\begin{document}
\pagestyle{empty}

\begin{tikzpicture}[x=4,y=1cm]
\draw[color=orange,domain=-2:2,smooth]
plot (\x,{exp(-\x * \x)})
node[right,black,xshift=1cm] {Test};
\end{tikzpicture}
\end{document}