如何修改 tikzpicture 标签的形状、字体和颜色?这里,我需要每个节点旁边的白色圆形标签

如何修改 tikzpicture 标签的形状、字体和颜色?这里,我需要每个节点旁边的白色圆形标签
\documentclass{standalone}
\usepackage{tikz}
\usepackage{amsfonts, amsmath, amsthm, amssymb} 
\usepackage[utf8]{inputenc}
\usepackage{dtklogos}
\usepackage{tikz}
\usepackage{verbatim}
\usetikzlibrary{mindmap,shadows}
\usetikzlibrary{positioning,shapes,shadows,arrows}
\usepackage[hidelinks,pdfencoding=auto]{hyperref}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[auto, node distance = 1.2cm, thick,
every node/.style = {rectangle, font = \Large\sffamily, black,
top color = green!90!white, bottom color = green!60!white,drop shadow,
text width = 8.4cm, align = center, minimum height = 2.3cm}]
\node[label={[fill=white, circle, yshift=2cm, font= \Large\sffamily, scale=0.4] right:22}] (SWGDAM) {\textbf{SWGDAM}\\Probabilistic Genotyping};
\coordinate [below = 2.5cm of SWGDAM] (Mitte);
\coordinate [below = 4.8cm of SWGDAM] (Unten);
\node (EDV)        [right = 10mm of Mitte, xshift=2cm]  {4.1};
\node (Verwaltung) [left = 10mm of Mitte, xshift=-2cm]  {4.2}; 
\coordinate [below = 0.5cm of EDV] (zoode);
\coordinate [below = 0.5cm of Verwaltung] (dire);
\node (Bau)        [below = of Verwaltung] {421};
\node (Logistik)   [below  = of Bau]        {4211};
\node (4212)   [below  = of Logistik]        {4212};
\node (4213)   [below  = of 4212]        {4213};
\node (Pflege)     [below = of EDV]        {411};
\node (Ausbildung) [right = of Pflege]     {412};
\node (413) [right = of Ausbildung]     {413};
\node (4121) [below = of Ausbildung]     {4121};
  \draw[line width=0.1cm, green!60!black]
(SWGDAM)    -- (Mitte) -- (Verwaltung)
% (EDV)   -- (Mitte) -- (Unten) -| (Logistik)
(EDV)   -- (Mitte)
 % (Unten) -| (Bau)
 % (Unten) -| (Pflege)
% (Unten) -| (Ausbildung);
(EDV)   -- (zoode)
(zoode) -| (Pflege)
(zoode)  -| (Ausbildung);
 \end{tikzpicture}
\end{document}

在此处输入图片描述

答案1

不太确定你在这里想要什么,这里确实没有太多信息。此外,还有很多代码可以简化。我相信这个问题可以得到更好的解决。

\documentclass{standalone}
\usepackage{tikz}
\usepackage{amsfonts, amsmath, amsthm, amssymb} 
\usepackage[utf8]{inputenc}
%\usepackage{dtklogos}
\usepackage{tikz}
\usepackage{verbatim}
\usetikzlibrary{mindmap,shadows}
\usetikzlibrary{positioning,shapes,shadows,arrows}
\usepackage[hidelinks,pdfencoding=auto]{hyperref}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[auto, node distance = 1.2cm, thick,
every node/.style = {rectangle, font = \Large\sffamily, black,
top color = green!90!white, bottom color = green!60!white,drop shadow,
text width = 8.4cm, align = center, minimum height = 2.3cm}]
\node[label={[fill=white, top color=white, bottom color=white, circle, yshift=2cm, text width=2cm, minimum height=0cm] right:{\Large\sffamily22}}] (SWGDAM) {\textbf{SWGDAM}\\Probabilistic Genotyping};
\coordinate [below = 2.5cm of SWGDAM] (Mitte);
\coordinate [below = 4.8cm of SWGDAM] (Unten);
\node (EDV)        [right = 10mm of Mitte, xshift=2cm]  {4.1};
\node (Verwaltung) [left = 10mm of Mitte, xshift=-2cm]  {4.2}; 
\coordinate [below = 0.5cm of EDV] (zoode);
\coordinate [below = 0.5cm of Verwaltung] (dire);
\node (Bau)        [below = of Verwaltung] {421};
\node (Logistik)   [below  = of Bau]        {4211};
\node (4212)   [below  = of Logistik]        {4212};
\node (4213)   [below  = of 4212]        {4213};
\node (Pflege)     [below = of EDV]        {411};
\node (Ausbildung) [right = of Pflege]     {412};
\node (413) [right = of Ausbildung]     {413};
\node (4121) [below = of Ausbildung]     {4121};
  \draw[line width=0.1cm, green!60!black]
(SWGDAM)    -- (Mitte) -- (Verwaltung)
% (EDV)   -- (Mitte) -- (Unten) -| (Logistik)
(EDV)   -- (Mitte)
 % (Unten) -| (Bau)
 % (Unten) -| (Pflege)
% (Unten) -| (Ausbildung);
(EDV)   -- (zoode)
(zoode) -| (Pflege)
(zoode)  -| (Ausbildung);
 \end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容