I'm trying to get these two tikzpictures to be shown side by side. This is what I have:

Not the most minimal example, but should be sufficient:
\documentclass[12pt,a4]{article}
\usepackage{tikz}
\begin{document}
\begin{center}
\begin{minipage}{.2\textwidth}
\begin{tikzpicture}[scale=0.33] %[x={10.0pt},y={10.0pt}]
\draw[line width=2pt] (0,0) -- (0,10);
\draw[line width=2pt] (0,0) -- (10,0);
\draw[line width=2pt] (0,10) -- (10,10);
\draw[line width=2pt] (0,10) -- (10,10);
\draw[line width=2pt] (10,0) -- (10,10);
\draw[line width=2pt] (0,0) -- (3,5);
\draw[line width=2pt] (10,0) -- (13,5);
\draw[line width=2pt] (0,10) -- (3,15);
\draw[line width=2pt] (10,10) -- (13,15);
\draw[line width=2pt] (3,5) -- (13,5);
\draw[line width=2pt] (3,5) -- (3,15);
\draw[line width=2pt] (13,5) -- (13,15);
\draw[line width=2pt] (3,15) -- (13,15);
\draw[line width=1pt] (5,0) -- (5,10);
\draw[line width=1pt] (5,10) -- (8,15);
\draw[line width=1pt] (5,0) -- (8,5);
\draw[line width=1pt] (8,5) -- (8,15);
\draw[black, fill=blue,fill opacity=0.5] (5,0) -- (5,10) -- (8,15) -- (8,5) -- cycle;
\end{tikzpicture} % pic 1
\end{minipage}
\begin{minipage}{.2\textwidth}
\begin{tikzpicture}[scale=0.33] %[x={10.0pt},y={10.0pt}]
\draw[line width=2pt] (0,0) -- (0,10);
\draw[line width=2pt] (0,0) -- (10,0);
\draw[line width=2pt] (0,10) -- (10,10);
\draw[line width=2pt] (0,10) -- (10,10);
\draw[line width=2pt] (10,0) -- (10,10);
\draw[line width=2pt] (0,0) -- (3,5);
\draw[line width=2pt] (10,0) -- (13,5);
\draw[line width=2pt] (0,10) -- (3,15);
\draw[line width=2pt] (10,10) -- (13,15);
\draw[line width=2pt] (3,5) -- (13,5);
\draw[line width=2pt] (3,5) -- (3,15);
\draw[line width=2pt] (13,5) -- (13,15);
\draw[line width=2pt] (3,15) -- (13,15);
\draw[line width=1pt] (0,10) -- (10,0);
\draw[line width=1pt] (0,10) -- (3,5);
\draw[line width=1pt] (3,5) -- (10,0);
\draw[black, fill=blue,fill opacity=0.5] (0,10) -- (10,0) -- (3,5) -- cycle;
\draw[line width=1pt] (3,15) -- (10,10);
\draw[line width=1pt] (3,15) -- (13,5);
\draw[line width=1pt] (10,10) -- (13,5);
\draw[black, fill=blue,fill opacity=0.5] (3,15) -- (10,10) -- (13,5) -- cycle;
\end{tikzpicture}
\end{minipage}
\end{center}
\end{document}
I've tried using minipage and subfigure/subcaption packages with no luck.
Edit: I'd like to have a caption below each tikzpicture (but I don't need to refer to it, so no external package is needed per se), hence why minipage is used, although now the spacing isn't consistent (too much space on the right):



\qquad\vrule\qquadshould do – egreg Aug 20 '15 at 15:11figure– egreg Aug 26 '21 at 12:59particularplace (e.g., after a particular line). But in most cases the figure isautomaticallyadjusted inarbitraryplace rather than in between the Proof. – learner Aug 26 '21 at 13:02figureif you need a caption and then there’s no problem in letting the object to float. Just use ‘center’ or even\[...\]– egreg Aug 26 '21 at 13:04\qquad. How do we write two differentcaptionsbelow each figure ? Any Help please – learner Aug 26 '21 at 13:07(a)(b)below of each image respectively? – alper Dec 10 '22 at 14:40\begin{tabular}{@{}cc@{}}\begin{tikzpicture}<first>\end{tikzpicture} & \begin{tikzpicture}<second>\end{tikzpicture} \\ (a) & (b) \end{tabular}– egreg Dec 10 '22 at 14:45figurecan we keep the figures centered like using in\begin{center}? – alper Aug 23 '23 at 08:42\begin{center}with\begin{figure}[htp]\centering(and of course\end{center}with\end{figure}). – egreg Aug 23 '23 at 09:49