Tikz:绘制分类/分类数字

时间:2017-01-22 08:54:06

标签: latex tikz

我第一次使用TikZ而且我不知道如何绘制这个分类标准。

enter image description here

我只设法绘制了2列,使用以下代码:

type

1 个答案:

答案 0 :(得分:1)

您可以使用 forest 包而不是尝试使用tikz手动绘制它。然后,更容易更改实际内容(节点,列数等):

\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{arrows.meta}
\usepackage{forest}

\begin{document}
    \begin{forest}
      for tree={
        line width=0.5pt,
        draw=black,
        fit=rectangle,
        edge={color=black,>={Triangle[]}, ->},
        if level=0{%
          l sep+=1cm,
          for descendants={%
            calign=first,
          },
          align=center,
          parent anchor=south,
        }{%
          if level=1{%
            parent anchor=south west,
            child anchor=north,
            tier=three ways,
            align=center,
            for descendants={%
              child anchor=west,
              parent anchor=west,
              align=left,
              anchor=west,
              xshift=-20pt,
              edge path={
                \noexpand\path[\forestoption{edge}]
                (!to tier=three ways.parent anchor) |-
                (.child anchor)\forestoption{edge label};
              },
            },
          }{}%
        },
      }
      [Drawing Diagrams
        [Operational
          [Offloading\\method
            [Cost\\benefit\\analysis
              [Mobility\\management
                [Connection\\protocol]
              ]
            ]
          ]
        ]
        [End user
          [Incentives
            [Presentation\\and usability]
          ]
        ]
        [Service level
          [Performance
            [Cloud APIs]
          ]
        ]
      ]
    \end{forest}
\end{document}

enter image description here