Organize várias árvores florestais com \subfigure{}

Organize várias árvores florestais com \subfigure{}

Quero organizar minhas árvores 2 x 2. Mas, em vez disso, recebo isto:

insira a descrição da imagem aqui

O que estou fazendo de errado? Não encontro meu erro.

\documentclass[a4paper,11pt]{article}
\usepackage{tikz}
\usepackage{subfigure}
\usepackage{array}

\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\usepackage{forest}
\begin{document}
\begin{figure}[htbp]
\begin{tabular}{C{.48\textwidth}C{.48\textwidth}}
\subfigure [Subfigure 1] {
\resizebox{0.4\textwidth}{!}{%
\begin{forest}
for tree={delay={where content={}{content={\phantom{00}}}{}},s sep+=5mm,l+=5mm}
[,circle,fill=black,inner sep=1mm
  [,circle,fill=red,inner sep=0.5mm
        [,circle,draw,red,inner sep=0.25mm,edge={red}
        [,circle,draw,red,inner sep=0.25mm,edge={red}]
     ]
     [,circle,draw,red,inner sep=0.5mm
        [,circle,draw,red,inner sep=0.25mm,edge={red}]
     ] 
  ]
  [,circle,fill=blue,inner sep=0.5mm
     [,circle,draw,blue,inner sep=0.25mm,edge={blue}
     ] 
  ]
  [,circle,fill=green,inner sep=0.5mm]
  [,circle,fill=orange,inner sep=0.5mm
  ]
]
\end{forest}
}}&
\subfigure [Subfigure 2] {
    \resizebox{0.4\textwidth}{!}{%
\begin{forest}
for tree={delay={where content={}{content={\phantom{00}}}{}},s sep+=5mm,l+=5mm}
[,circle,fill=black,inner sep=1mm
  [,circle,fill=red,inner sep=0.5mm
     [,circle,draw,red,inner sep=0.25mm,edge={red}]
     [,circle,draw,red,inner sep=0.5mm 
     ] 
  ]
  [,circle,fill=blue,inner sep=0.5mm
     [,circle,draw,blue,inner sep=0.25mm,edge={blue}
        [,circle,draw,blue,inner sep=0.25mm,edge={blue}]
     ]
     [,circle,draw,blue,inner sep=0.25mm,edge={blue}
     ] 
  ]
  [,circle,fill=green,inner sep=0.5mm  
  ]
  [,circle,fill=orange,inner sep=0.5mm
  ]
]
\end{forest}
}}\
\subfigure [Subfigure 3]{
    \resizebox{0.4\textwidth}{!}{%
\begin{forest}
for tree={delay={where content={}{content={\phantom{00}}}{}},s sep+=5mm,l+=5mm}
[,circle,fill=black,inner sep=1mm
  [,circle,fill=red,inner sep=0.5mm]
  [,circle,fill=blue,inner sep=0.5mm]
  [,circle,fill=green,inner sep=0.5mm
        [,circle,draw,green,inner sep=0.25mm,edge={green}]
  ]
  [,circle,fill=orange,inner sep=0.5mm
        [,circle,draw,orange,inner sep=0.25mm,edge={orange}]
        [,circle,draw,orange,inner sep=0.25mm,edge={orange}
            [,circle,draw,orange,inner sep=0.25mm,edge={orange}]    
        ] 
  ]
]
\end{forest}
}}
\subfigure [Subfigure 4] {
    \resizebox{0.4\textwidth}{!}{%
\begin{forest}
for tree={delay={where content={}{content={\phantom{00}}}{}},s sep+=5mm,l+=5mm}
[,circle,fill=black,inner sep=1mm
  [,circle,fill=red,inner sep=0.5mm]
  [,circle,fill=blue,inner sep=0.5mm]
  [,circle,fill=green,inner sep=0.5mm
        [,circle,draw,green,inner sep=0.25mm,edge={green}]
        [,circle,draw,green,inner sep=0.25mm,edge={green}]
  ]
  [,circle,fill=orange,inner sep=0.5mm
        [,circle,draw,orange,inner sep=0.25mm,edge={orange}]
        [,circle,draw,orange,inner sep=0.25mm,edge={orange}]
        [,circle,draw,orange,inner sep=0.25mm,edge={orange}
        [,circle,draw,orange,inner sep=0.25mm,edge={orange}
            [,circle,draw,orange,inner sep=0.25mm,edge={orange}]
        ] 
        ] 
  ]
]
\end{forest}
}}
\end{tabular}
\end{figure}
\end{document}

Responder1

No seu código, falta a barra invertida dupla \\e a segunda . &(Veja as posições marcadas no código abaixo.)

insira a descrição da imagem aqui

\documentclass[a4paper,11pt]{article}
\usepackage{tikz}
\usepackage{subfigure}
\usepackage{array}

\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\usepackage{forest}
\begin{document}
\begin{figure}[htbp]
\begin{tabular}{C{.48\textwidth}C{.48\textwidth}}
\subfigure [Subfigure 1] {
\resizebox{0.4\textwidth}{!}{%
\begin{forest}
for tree={delay={where content={}{content={\phantom{00}}}{}},s sep+=5mm,l+=5mm}
[,circle,fill=black,inner sep=1mm
  [,circle,fill=red,inner sep=0.5mm
        [,circle,draw,red,inner sep=0.25mm,edge={red}
        [,circle,draw,red,inner sep=0.25mm,edge={red}]
     ]
     [,circle,draw,red,inner sep=0.5mm
        [,circle,draw,red,inner sep=0.25mm,edge={red}]
     ] 
  ]
  [,circle,fill=blue,inner sep=0.5mm
     [,circle,draw,blue,inner sep=0.25mm,edge={blue}
     ] 
  ]
  [,circle,fill=green,inner sep=0.5mm]
  [,circle,fill=orange,inner sep=0.5mm
  ]
]
\end{forest}
}}&
\subfigure [Subfigure 2] {
    \resizebox{0.4\textwidth}{!}{%
\begin{forest}
for tree={delay={where content={}{content={\phantom{00}}}{}},s sep+=5mm,l+=5mm}
[,circle,fill=black,inner sep=1mm
  [,circle,fill=red,inner sep=0.5mm
     [,circle,draw,red,inner sep=0.25mm,edge={red}]
     [,circle,draw,red,inner sep=0.5mm 
     ] 
  ]
  [,circle,fill=blue,inner sep=0.5mm
     [,circle,draw,blue,inner sep=0.25mm,edge={blue}
        [,circle,draw,blue,inner sep=0.25mm,edge={blue}]
     ]
     [,circle,draw,blue,inner sep=0.25mm,edge={blue}
     ] 
  ]
  [,circle,fill=green,inner sep=0.5mm  
  ]
  [,circle,fill=orange,inner sep=0.5mm
  ]
]
\end{forest}
}}\\ % <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< HERE HERE HERE
\subfigure [Subfigure 3]{
    \resizebox{0.4\textwidth}{!}{%
\begin{forest}
for tree={delay={where content={}{content={\phantom{00}}}{}},s sep+=5mm,l+=5mm}
[,circle,fill=black,inner sep=1mm
  [,circle,fill=red,inner sep=0.5mm]
  [,circle,fill=blue,inner sep=0.5mm]
  [,circle,fill=green,inner sep=0.5mm
        [,circle,draw,green,inner sep=0.25mm,edge={green}]
  ]
  [,circle,fill=orange,inner sep=0.5mm
        [,circle,draw,orange,inner sep=0.25mm,edge={orange}]
        [,circle,draw,orange,inner sep=0.25mm,edge={orange}
            [,circle,draw,orange,inner sep=0.25mm,edge={orange}]    
        ] 
  ]
]
\end{forest}
}}& % <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< HERE HERE HERE
\subfigure [Subfigure 4] {
    \resizebox{0.4\textwidth}{!}{%
\begin{forest}
for tree={delay={where content={}{content={\phantom{00}}}{}},s sep+=5mm,l+=5mm}
[,circle,fill=black,inner sep=1mm
  [,circle,fill=red,inner sep=0.5mm]
  [,circle,fill=blue,inner sep=0.5mm]
  [,circle,fill=green,inner sep=0.5mm
        [,circle,draw,green,inner sep=0.25mm,edge={green}]
        [,circle,draw,green,inner sep=0.25mm,edge={green}]
  ]
  [,circle,fill=orange,inner sep=0.5mm
        [,circle,draw,orange,inner sep=0.25mm,edge={orange}]
        [,circle,draw,orange,inner sep=0.25mm,edge={orange}]
        [,circle,draw,orange,inner sep=0.25mm,edge={orange}
        [,circle,draw,orange,inner sep=0.25mm,edge={orange}
            [,circle,draw,orange,inner sep=0.25mm,edge={orange}]
        ] 
        ] 
  ]
]
\end{forest}
}}
\end{tabular}
\end{figure}
\end{document}

informação relacionada