I'd like to put parentheses around a picture I'm drawing with tikz. I tried using \left( and \right but this gives me parentheses twice the height of the picture, with the picture only occupying the top half of space within the parentheses. How can I get parentheses the same size as the picture?
So far I have:
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\[ \left( \begin{tikzpicture}[scale=0.2] \draw [magenta, line width =1mm] (0,-1) rectangle (4,3); \draw [magenta, line width=1mm] (4,-1) rectangle (6,-3); \end{tikzpicture} \right)
\]
\end{document}


baseline=-\the\fontdimen22\textfont2– egreg Apr 04 '16 at 17:37