在 latex 中使用 tikz 绘制树形图。如何将不同的森林类别划分为两列或三列?

在 latex 中使用 tikz 绘制树形图。如何将不同的森林类别划分为两列或三列?

这是我的代码:

\begin{figure}
    \centering
     % \tikzset{
    basic/.style  = {draw, text width=3cm, align=center, font=\sffamily, rectangle},
    root/.style   = {basic, rounded corners=2pt, thin, align=center, fill=green!30},
    onode/.style = {basic, thin, rounded corners=2pt, align=center, fill=green!60,text width=3cm,},
    tnode/.style = {basic, thin, align=left, fill=pink!60, text width=15em, align=center},
    xnode/.style = {basic, thin, rounded corners=2pt, align=center, fill=blue!20,text width=5cm,},
    wnode/.style = {basic, thin, align=left, fill=pink!10!blue!80!red!10, text width=6.5em},
    edge from parent/.style={draw=black, edge from parent fork right}

} %

\begin{forest} for tree={
    grow=east,
    growth parent anchor=west,
    parent anchor=east,
    child anchor=west,
    edge path={\noexpand\path[\forestoption{edge},->, >={latex}] 
         (!u.parent anchor) -- +(10pt,0pt) |-  (.child anchor) 
         \forestoption{edge label};} } % lsep is used for arrow distance [Spatial Models, basic,  l sep=10mm,
    [Discrete Patches\\ AI, xnode,  l sep=10mm,
        ]
    [Continuous, xnode,  l sep=10mm,
        ] 
    [Intervention, xnode,  l sep=10mm,
       ] ]       \end{forest} 

\begin{forest} for tree={
    grow=east,
    growth parent anchor=west,
    parent anchor=east,
    child anchor=west,
    edge path={\noexpand\path[\forestoption{edge},->, >={latex}] 
         (!u.parent anchor) -- +(10pt,0pt) |-  (.child anchor) 
         \forestoption{edge label};} } % lsep is used for arrow distance [Equation types, basic,  l sep=10mm,
    [ODEs, xnode,  l sep=10mm,
        ]
    [PDEs, xnode,  l sep=10mm,
        ]
    [Integral Equation, xnode,  l sep=10mm,
        ] 
    [Fractional Differential Equation, xnode,  l sep=10mm,
       ] ]       \end{forest}

\begin{forest} for tree={
    grow=east,
    growth parent anchor=west,
    parent anchor=east,
    child anchor=west,
    edge path={\noexpand\path[\forestoption{edge},->, >={latex}] 
         (!u.parent anchor) -- +(10pt,0pt) |-  (.child anchor) 
         \forestoption{edge label};} } % lsep is used for arrow distance [Intervention models, basic,  l sep=10mm,
    [Mechanical interventions, xnode,  l sep=10mm,
        ]
    [Treatment, xnode,  l sep=10mm,
        ]
    [Educational, xnode,  l sep=10mm,
        ] 
    [Multiple intervention, xnode,  l sep=10mm,
       ] ]       \end{forest}

相关内容