You can add the baseline
option to both TikZ picture so that the vertical value y = 0 will be the baseline from both pictures. But this also displaces the captions, this can be avoided by adding a pseudo-node to the left picture where the right one has the V_rep
node.
With the subcaption
package, the same trick can be used.
Code (subfig
)
\documentclass{article}
\usepackage{tikz,amsmath}
\usepackage{subfig}
\begin{document}
\begin{figure}\centering
\subfloat[Using the electrode as einzel lens.]{
\begin{tikzpicture}[baseline]
\draw[->] (-0.25,0) -- (3.5,0) node[below left] {$z$};
\draw[->] (0,-0.25) -- (0,3.5) node[below left] {$V$};
\draw (0, 3.0) node[above right] {$V_p$} -- ++(0.35, 0) -- ++(1.25, -3.0) -- ++(0.25, 0) -- ++(0.15, 0.75) node[above] {$V_{\text{ein}}$} -- ++(0.30, 0) -- ++(0.15, -0.750);
\end{tikzpicture}}\quad
\subfloat[Using the electrode as repeller.]{
\begin{tikzpicture}[baseline]
\draw[->] (-0.25,0) -- (3.5,0) node[below left] {$z$};
\draw[->] (0,-0.25) -- (0,3.5) node[below left] {$V$};
\draw (0, 3.0) node[above right] {$V_p$} -- ++(0.35, 0) -- ++(1.25, -3.0) -- ++(0.25, 0) -- ++(0.15, -.75) node[below] {$V_{\text{rep}}$} -- ++(0.30, 0) -- ++(0.15, 0.750);
\end{tikzpicture}}
\caption{Potentail diagram of the extraction.}
\end{figure}
\begin{figure}\centering
\subfloat[Using the electrode as einzel lens.]{
\begin{tikzpicture}
\draw[->] (-0.25,0) -- (3.5,0) node[below left] {$z$};
\draw[->] (0,-0.25) -- (0,3.5) node[below left] {$V$};
\draw (0, 3.0) node[above right] {$V_p$} -- ++(0.35, 0) -- ++(1.25, -3.0) -- ++(0.25, 0) -- ++(0.15, 0.75) node[above] {$V_{\text{ein}}$} -- ++(0.30, 0) -- ++(0.15, -0.750);
\path (0,-.75) node[below,opacity=0] {$V_{\text{rep}}$}; % <- Pseudonode
\end{tikzpicture}}\quad
\subfloat[Using the electrode as repeller.]{
\begin{tikzpicture}
\draw[->] (-0.25,0) -- (3.5,0) node[below left] {$z$};
\draw[->] (0,-0.25) -- (0,3.5) node[below left] {$V$};
\draw (0, 3.0) node[above right] {$V_p$} -- ++(0.35, 0) -- ++(1.25, -3.0) -- ++(0.25, 0) -- ++(0.15, -.75) node[below] {$V_{\text{rep}}$} -- ++(0.30, 0) -- ++(0.15, 0.750);
\end{tikzpicture}}
\caption{Potentail diagram of the extraction.}
\end{figure}
\end{document}
Code (subcaption
)
\documentclass{article}
\usepackage{tikz,amsmath}
\usepackage{subcaption}
\begin{document}
\begin{figure}\centering
\subcaptionbox{Using the electrode as einzel lens.}{
\begin{tikzpicture}
\draw[->] (-0.25,0) -- (3.5,0) node[below left] {$z$};
\draw[->] (0,-0.25) -- (0,3.5) node[below left] {$V$};
\draw (0, 3.0) node[above right] {$V_p$} -- ++(0.35, 0) -- ++(1.25, -3.0) -- ++(0.25, 0) -- ++(0.15, 0.75) node[above] {$V_{\text{ein}}$} -- ++(0.30, 0) -- ++(0.15, -0.750);
\path (0,-.75) node[below,opacity=0] {$V_{\text{rep}}$}; % <- Pseudonode
\end{tikzpicture}}\quad
\subcaptionbox{Using the electrode as repeller.}{
\begin{tikzpicture}
\draw[->] (-0.25,0) -- (3.5,0) node[below left] {$z$};
\draw[->] (0,-0.25) -- (0,3.5) node[below left] {$V$};
\draw (0, 3.0) node[above right] {$V_p$} -- ++(0.35, 0) -- ++(1.25, -3.0) -- ++(0.25, 0) -- ++(0.15, -.75) node[below] {$V_{\text{rep}}$} -- ++(0.30, 0) -- ++(0.15, 0.750);
\end{tikzpicture}}
\caption{Potentail diagram of the extraction.}
\label{fig:potential}
\end{figure}
\end{document}
Output
Best Answer
The problem is not the baseline of the
\resizebox
but the baseline of the tabular which is on its center by default. So changing the baseline of the tabular with[b]
solves this issue:Addendum 2013-01-04: As user adn has found out, the captions are still not perfectly aligned. (See comments below.) A possible solution would be switching to the
subcaption
package resp. its\subcaptionbox
command:Please note that changing the baseline of the inner tabular (with
[b]
) is not necessary here since a\subcaptionbox
always has its baseline between content and caption, and therefore the two\subcaptionbox
es are already aligned by default.