如何绘制以下自上而下的树状图

如何绘制以下自上而下的树状图
\documentclass[11pt, oneside]{article}      

\title{Brief Article}


\begin{document}


\end{document} 

在此处输入图片描述

答案1

对于绘制树来说,这个forest包非常方便:

\documentclass[border=3.141592]{standalone}%{article}
\usepackage[edges]{forest}

\begin{document}
    \begin{forest}
for tree = {
% nodes
    circle, minimum size=0.5ex, fill, outer sep=0pt,
% tree style
    grow = east,
    forked edge,        
    s sep = 2mm, 
    l sep = 8mm,  
 fork sep = 4mm,
            }        
[, label=left:\textbf{ISO\slash IEC 29100:2011} 
    [, label=right:Consent and Choice]
    [, label=right:Purpose Legitimacy and Specification]
    [, label=right:Collection Limitation]
    [, label=right:Data Minimization]
    [, label=right:{Use, Retention and Disclosure Limitationg}]
    [, label=right:Accuracy and Quality]
    [, label=right:{Openness, Transparency and Notice}]
    [, label=right:Individual Participation and Access]
    [, label=right:Accountability]
    [, label=right:Information Security Controls]
    [, label=right:Compliance]
 ]
    \end{forest}
\end{document}

在此处输入图片描述

附註: 通过定义样式,可以手动分割节点标签中的文本。要使用两行标签,您需要增加节点之间的距离(图中的点)使用它会使图表的代码更短一些:

\documentclass[border=3.141592]{standalone}%{article}
\usepackage[edges]{forest}

\begin{document}
    \begin{forest}
for tree = {
% nodes
    circle, minimum size=0.5ex, fill, outer sep=0pt,
% tree style
    grow = east,
    forked edge,
    s sep = 4mm,
    l sep = 8mm,
 fork sep = 4mm,
lr/.style = {label={[align=left,    % <--- added
                     font=\linespread{0.84}\selectfont]right:{#1}}}
            }
[, label=left:\textbf{ISO\slash IEC 29100:2011}
    [, lr=Consent and Choice]
    [, lr=Purpose Legitimacy and Specification]
    [, lr=Collection Limitation]
    [, lr=Data Minimization]
    [, lr={Use, Retention and Disclosure\\ Limitationg}]
    [, lr=Accuracy and Quality]
    [, lr={Openness, Transparency and Notice}]
    [, lr=Individual Participation and Access]
    [, lr=Accountability]
    [, lr=Information Security Controls]
    [, lr=Compliance]
 ]
    \end{forest}
\end{document}

在此处输入图片描述

答案2

Ti 中的快速和肮脏Z:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\filldraw (0,0)    circle[radius=0.5ex] node [anchor=east, xshift=-0.5ex] {\strut\bfseries ISO\slash IEC 29100:2011};
\filldraw (2,2.5)  circle[radius=0.5ex] node [anchor=west, xshift=0.5ex]  {\strut Consent and Choice};
\filldraw (2,2)    circle[radius=0.5ex] node [anchor=west, xshift=0.5ex]  {\strut Purpose Legitimacy and Specification};
\filldraw (2,1.5)  circle[radius=0.5ex] node [anchor=west, xshift=0.5ex]  {\strut Collection Limitation};
\filldraw (2,1)    circle[radius=0.5ex] node [anchor=west, xshift=0.5ex]  {\strut Data Minimization};
\filldraw (2,0.5)  circle[radius=0.5ex] node [anchor=west, xshift=0.5ex]  {\strut Use, Retention and Disclosure Limitation};
\filldraw (2,0)    circle[radius=0.5ex] node [anchor=west, xshift=0.5ex]  {\strut Accuracy and Quality};
\filldraw (2,-0.5) circle[radius=0.5ex] node [anchor=west, xshift=0.5ex]  {\strut Openness, Transparency and Notice};
\filldraw (2,-1)   circle[radius=0.5ex] node [anchor=west, xshift=0.5ex]  {\strut Individual Participation and Access};
\filldraw (2,-1.5) circle[radius=0.5ex] node [anchor=west, xshift=0.5ex]  {\strut Accountability};
\filldraw (2,-2)   circle[radius=0.5ex] node [anchor=west, xshift=0.5ex]  {\strut Information Security Controls};
\filldraw (2,-2.5) circle[radius=0.5ex] node [anchor=west, xshift=0.5ex]  {\strut Compliance};
\draw (0,0) -- +(1,0);
\draw (1,-2.5) -- +(0,5);
\foreach \n in {-2.5,-2,...,2.5} {\draw (1,\n) -- +(1,0);}
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容