I've got two diagrams, and am trying to put text in between them on the same line so as to talk about a transformation between them. I'm also trying to be able to reference the diagram as a whole with a label which I'm referencing elsewhere in the text. The issue I'm having is that the tikzpictures are put into the equation by (what I think is) the south west corner, so that the text and label are both very low compared to my diagrams.
Here's a MWE and its output
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\begin{document}
\begin{equation}\label{equation}
\begin{tikzpicture}
\node[circle,draw] (0) at (0,0) {0};
\node[circle,draw] (1) at (0,4) {1};
\draw (0) -- (1);
\end{tikzpicture}
\quad \text{adding 1 gives} \quad
\begin{tikzpicture}
\node[circle,draw] (0) at (0,0) {1};
\node[circle,draw] (1) at (0,4) {2};
\draw (0) -- (1);
\end{tikzpicture}
\end{equation}
\end{document}
My hope would be to include the tikzpictures by anchoring them in the middle as opposed to the bottom, but I would also be happy with manually moving the label and text higher (although this seems like it could be more complicated). I'm also calling the tikzpictures in with another command so am not really able to edit them directly.
baseline=2cm
as option to the twotikzpicture
environments:\begin{tikzpicture}[baseline=2cm]
.