我如何使用“森林”绘制该组织结构图?

我如何使用“森林”绘制该组织结构图?

在此处输入图片描述

我如何使用“森林”绘制此组织结构图?或者其他方法?

答案1

这是一个解决方案pstricks

\documentclass[svgnames, table]{article}
\usepackage{pst-node}
\newcommand{\chartbox}[2]{\psDefBoxNodes{#1}{\fboxrule=0.8pt\fcolorbox{MediumBlue}{white}{%
\makebox[0.25\textwidth]{\rule[-3ex]{0pt}{8ex}\sffamily#2}}}}

\begin{document}

\centering
\hfill\chartbox{A}{A}\hfill\chartbox{B}{B}\hfill\chartbox{C}{C} \hfill\null\vskip 2cm

\chartbox{D}{D}
\psset{linewidth=1pt, linecolor=LightSteelBlue, linejoin=1, arrows=->, arrowinset=0.12}
\ncline{B:bC}{D:tC}
\psset{armB=1.1cm, angleA=-90, angleB=90}
\ncangle{A:bC}{D:tC}
\ncangle{C:bC}{D:tC}

\end{document} 

在此处输入图片描述

答案2

在此处输入图片描述

这是简单的图表。您需要使用选项加载森林edges(用于定义分叉边的森林库边):

\documentclass[tikz, border=5pt]{standalone}
\usepackage[edges]{forest}

\begin{document}
\begin{forest}
  for tree={
% tyle of nodes
    draw = teal, semithick,
    font = \sffamily,
    text width = 18mm, text badly centered,% <-- "align=center" doesn't work
    inner sep = 3mm,
% style of tree (edges, distances, direction)
    parent anchor = north,
    parent anchor = north,
            grow' = north,
             edge = teal!50,
    forked edge,            % for forked edge
            s sep = 4mm,    % sibling distance
            l sep = 8mm,    % level distance
         fork sep = 4mm,    % distance from parent to branching point
         tier/.option=level,
               }
  [D        % root
    [A]     
    [B]     
    [C]     
  ]
\end{forest}
\end{document} 

相关内容