I used the following code, from the answers to this question and this question, to draw a Spirograph figure
\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\usepackage{tikz}
\usepackage{verbatim}
\begin{document}
\tikzset{pics/spiro/.style={code={
\tikzset{spiro/.cd,#1}
\def\pv##1{\pgfkeysvalueof{/tikz/spiro/##1}}
\draw[trig format=rad,pic actions]
plot[variable=\t,domain=0:2*pi*\pv{nRotations}, samples=90*\pv{nRotations}+1, smooth cycle]
(
{(\pv{R}+\pv{r})*cos(\t)+\pv{p}*cos((\pv{R}+\pv{r})*\t/\pv{r})},
{(\pv{R}+\pv{r})*sin(\t)+\pv{p}*sin((\pv{R}+\pv{r})*\t/\pv{r})}
);
}},
spiro/.cd,R/.initial=6,r/.initial=-1.5,p/.initial=1,nRotations/.initial=1}
\begin{frame}[t]
\frametitle{Spiro`6,-1.5,1`}
\begin{tikzpicture}[line width=.06cm]
\begin{scope}[scale=.68]
\begin{scope}[xshift=4.5cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=4cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=3.5cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=3cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=2.5cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=2cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=1.5cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=1cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=.5cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=-4.5cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=-4cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=-3.5cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=-3cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=-2.5cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=-2cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=-1.5cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=-1cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\begin{scope}[xshift=-.5cm]
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=.68]{spiro={p=1}};
\end{scope}
\foreach \scl/\p in {.68/1,.56/.6,.44/.4,.32/.2,.2/.1}
{
(0,0) \pic[draw,blue,outer color=blue!80,inner color=blue!10,scale=\scl]{spiro={p=\p}};
}
\end{scope}
\end{tikzpicture}
\end{frame}
\end{document}
There is a white space to the left of the tikzpicture. I am trying to shift the whole drawing to the left to use this unused space.
I tried \begin{scope}[xshift=-2cm] , \begin{scope}[shift={(180:2cm)}] and \tikzset{shift={(-2,0)}} , but they did not work.
Also is it possible to simplify the code for shifting {scope}.


tikzpictureis treated like a simple character. Therefore, your picture is aligned on frame like a simplea. The problem is that the figure is too large to fit in one frame. You'll have to scale down the figure to show it, or design an smaller one. – Ignasi Jan 09 '20 at 08:23