I have several TikZ pictures, most are long files, which I would like to include in a Beamer presentation.
I am using adjustbox package to scale the tikzpicture and using the columns environment and \vspace{} to place the figure.
For example,
\documentclass[t]{beamer}
\usepackage{multicol}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{graphicx}
% \usepackage{textpos} % para posicionar los frames en color
\usepackage{xcolor}
%%%---------------
\usetikzlibrary{calc}
\usetikzlibrary{shapes.multipart}
\usetikzlibrary{positioning}
\usetikzlibrary{shapes.geometric, arrows,positioning,shapes,arrows}
%%%%---------------------
\usepackage{adjustbox}
\setbeamercovered{transparent=7}
\begin{document}
\begin{frame}[t]{Calidad}
La calidad está relacionada con el ancho de banda y el retardo, e influye en la \textcolor{blue}{fiabilidad} y la \textcolor{blue}{\textbf{disponibilidad}}
\begin{columns}[onlytextwidth]
\begin{column}{0.48\textwidth} \vspace{.5cm}
\begin{adjustbox}{max totalsize={1\textwidth}{1\textheight},left}
\begin{tikzpicture}%[font=\sffamily,]
% \draw[help lines] (0,-1) grid (8,6);
\draw[draw=black,fill=blue!10!green!30,semithick] (0,2) rectangle ++(3,1) node[yshift=+0.7cm,align=left] (A) {\small Falta de\\\small rendimiento};
\draw[draw=black,fill=yellow!20,semithick] (3,2) rectangle ++(1.8,1) node[pos=0.5] (B) {{\small 1}};
\draw[draw=black,fill=yellow!20,semithick] (4.8,2) rectangle ++(1,1)node[pos=0.5] {{\small 2}};
\draw[draw=black,fill=red!20,semithick] (5.8,2) rectangle ++(0.7,1) node (bel) [pos=0.5] {};
\draw[>-latex,semithick,red] ($(A)+(-0.4,-0.55)$) -- ($(A)+(0.4,-0.55)$);
\draw[>-latex,semithick,red] ($(B)+(0.65,0)$) --++ (0.55,0);
\draw[black,latex-latex,] (0, 1.4) --++ (3,0) node [midway,above] {\small{Capacidad real}};
\draw[black,latex-latex,] (0, .5) --++ (6.5,0) node [midway,above] {\small{Capacidad total}};
\node[below,align=left] (i1) at (2,0) {\small 1. Incrementar la eficiencia \\ \small 2. Mejorar la \only<2>{disponibilidad}\only<3->{\textbf{disponibilidad}}};
\draw[thin] (0,2) --++ (0,-1.6);
\draw[thin] (3,2) --++ (0,-0.7);
\draw[thin] (6.5,2) --++ (0,-1.6);
\draw[black,latex-] (5.3,3) --++ (120:1.2) node [above, align=left,xshift=0.5cm] {\small Indisponibilidad\\ \small evitable};
\draw[black,latex-] ($(bel) + (0,.5)$) --++ (90:0.3) node [above, align=left,xshift=0.5cm] {\small Indisponibilidad\\ \small inevitable};
\end{tikzpicture}
\end{adjustbox}
\end{column}
\column{0.49\textwidth}
\begin{block}{GdR sirve para mejorar la disponibilidad}
\begin{itemize}
\item Provisión de servicios
\item<+-> Evolución del rendimiento
\item<+-> Correlación de alarmas
\end{itemize}
\end{block}
\end{columns}
\end{frame}
\end{document}
I would like to make \input{file.tex} to make a cleaner code.
Besides, I want to be able to scale down the tickzpicture of file.tex and easily test where to place the resulting image at the free space left in the slide.







columnsenvironment to split the slide into columns of selected widths, and place the table on one and the figure on the other. – vonbrand Aug 21 '21 at 19:45