I have the following figure, containing three subfigures:
I'm using the following code to produce it/them:
\begin{figure}[htbp]%
\tikzstyle{morpho} = [circle,draw,minimum size=1cm,thick,fill=white,font=\tiny]%
\tikzstyle{grouping} = [thick,rounded corners=5pt,fill=#1!20]%
\pgfmathsetmacro{\O}{0.6}%
\pgfmathsetmacro{\P}{1.5}%
\centering
\begin{subfigure}[b]{0.3\textwidth}
\centering
\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (O) at (\P,0);
\coordinate (Sa) at (0,-\P);
\coordinate (Ss) at (\P,-\P);
\draw[grouping=blue]
($(A)+(-\O,\O)$) --($(A)+(\O,\O)$) -- ($(Sa)+(\O,\O)$) --
($(Ss)+(\O,\O)$) -- ($(Ss)+(\O,-\O)$) -- ($(Sa)+(-\O,-\O)$) -- cycle;
\draw[grouping=red]
($(O)+(-\O,\O)$) -- ($(O)+(\O,\O)$) -- ($(O)+(\O,-\O)$) -- ($(O)+(-\O,-\O)$) -- cycle;
\node[morpho] at (A) {Agent};
\node[morpho] at (O) {Patient};
\node[morpho] at (Sa) {Active};
\node[morpho] at (Ss) {Stative};
\end{tikzpicture}
\caption{Nominative-Accusative}
\end{subfigure}
\begin{subfigure}[b]{0.3\textwidth}
\centering
\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (O) at (\P,0);
\coordinate (Sa) at (0,-\P);
\coordinate (Ss) at (\P,-\P);
\draw[grouping=red]
($(O)+(-\O,\O)$) --($(O)+(\O,\O)$) -- ($(Ss)+(\O,-\O)$) --
($(Sa)+(-\O,-\O)$) -- ($(Sa)+(-\O,\O)$) -- ($(Ss)+(-\O,\O)$) -- cycle;
\draw[grouping=blue]
($(A)+(-\O,\O)$) -- ($(A)+(\O,\O)$) -- ($(A)+(\O,-\O)$) -- ($(A)+(-\O,-\O)$) -- cycle;
\node[morpho] at (A) {Agent};
\node[morpho] at (O) {Patient};
\node[morpho] at (Sa) {Active};
\node[morpho] at (Ss) {Stative};
\end{tikzpicture}
\caption{Ergative-Absolutive}
\end{subfigure}
\begin{subfigure}[b]{0.3\textwidth}%
\centering
\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (O) at (\P,0);
\coordinate (Sa) at (0,-\P);
\coordinate (Ss) at (\P,-\P);
\draw[grouping=red]
($(O)+(-\O,\O)$) -- ($(O)+(\O,\O)$) -- ($(O)+(\O,-\O)$) -- ($(O)+(-\O,-\O)$) -- cycle;
\draw[grouping=blue]
($(A)+(-\O,\O)$) -- ($(A)+(\O,\O)$) -- ($(A)+(\O,-\O)$) -- ($(A)+(-\O,-\O)$) -- cycle;
\draw[grouping=green]
($(Sa)+(-\O,\O)$) --($(Ss)+(\O,\O)$) -- ($(Ss)+(\O,-\O)$) -- ($(Sa)+(-\O,-\O)$) -- cycle;
\node[morpho] at (A) {Agent};
\node[morpho] at (O) {Patient};
\node[morpho] at (Sa) {Active};
\node[morpho] at (Ss) {Stative};
\end{tikzpicture}
\caption{Ergative-Accusative (Tripartite)}
\end{subfigure}
\caption{Morphosyntactic Alignments}
\end{figure}
There are several obvious problems with this. One, the tops of the drawings are not aligned (it looks like LaTeX is aligning to the bottom of the captions). Second, the captions themselves look really ugly. For figure 5.1a, there's the leading space in front of "Nominative-". For figure 5.1c, I think the layout of the text doesn't look very good. Instead of
(c) Ergative-Accusative
(Tripartite)
I would prefer something like
(c) Ergative-Accusative
(Tripartite)
Update:
So thanks to a commenter, I was able to figure out the alignment problem: I had forgotten about the "b" option left in from an example I had originally copy/pasted. Here's what my output looks like now:
I increased the width of each of the subfigures from 0.3 to 0.32 of the textwidth, so there's no line breaking anymore for "Nominative-Accusative." However, I still have the problem with 5.1c. It has the leading space, which looks bad, and I can't figure out how to get it to align as mentioned earlier. I should also mention that I'm using the subcaption
package.
b
option tosubfigure
bottom aligns the subfigures vertically. As the three TikZ pictures look as if they all have the same size, they do not matter for this question. However, it matters how your preamble looks like. (Which class do use? Do you use a package that changes captions? Which package does provide thesubfigure
environment?)subcaption
package.\subcaption
problem. This would also mean to get rid of the whole tikz-pgf stuff and to include the full caption setup, if any.mwe
package or just dummy text or boxes for the subfigures' contents.