我想将所有文本放入思维导图的节点中
我尝试过“文本宽度”,但我确实希望节点的大小不同(取决于父子关系)。还想将字体更改为不同的粗细。
documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\tikzset{
every node/.append style={concept, rectangle, minimum size=0.5cm, inner sep=0.2mm}
}
\begin{document}
\begin{center}
\tikz[mindmap,concept color=blue!70]
\node [concept] {Wind turbine Monitoring}
child[grow=30,concept color=blue!50] {
node[concept] {Blades}
[clockwise from=0]
child[grow=30] {node[concept] {Vbrations}}
child[grow=150] {node[concept] {Loads:Bending Moments}}
}
child[grow=150,concept color=blue!70] {
node[concept] {Tower}
[clockwise from=0]
child[grow=30,concept color=blue!50] {node[concept] {Bending Moments}}
child[grow=150] {node[concept] {Oscillations}}
}
child[grow=270] {
node[concept] {Drive Train}
[clockwise from=0]
child[grow=-90] {
node[concept] {Vibration}
child[grow=-90] {node[concept] {acceleration}}
}
child[grow=150,concept color=blue!50] {
node[concept] {Loads}
[clockwise from=0]
child[grow=-150,concept color=blue!50] {node[concept] {Fatigue}}
}
child[grow=30,concept color=blue!50] {node[concept] {Oil Particles}}
}
;
\end{center}
\end{document}
最后,我想将这张图片用于 *.ppt 演示文稿,因此节点和文本的大小对我来说很重要。非常感谢。
答案1
您可以根据样式级别更改样式level N concept
,如手册第 58.2 节所述。(N
是一个整数,从 1 开始计数。)
\documentclass[border=2mm]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\begin{document}
\begin{tikzpicture}[
mindmap,
concept color=blue!70,
every node/.append style={concept,inner sep=0.2mm},
level 1 concept/.append style={text width=2.5cm,font=\small},
level 2 concept/.append style={text width=2cm,font=\scriptsize},
level 3 concept/.append style={text width=1cm,font=\tiny\bfseries},
]
\node {Wind turbine Monitoring}
child[grow=30,concept color=blue!50] {
node {Blades}
[clockwise from=0]
child[grow=30] {node {Vibrations}}
child[grow=150] {node {Loads: Bending Moments}}
}
child[grow=150,concept color=blue!70] {
node {Tower}
[clockwise from=0]
child[grow=30,concept color=blue!50] {node {Bending Moments}}
child[grow=150] {node {Oscillations}}
}
child[grow=270] {
node {Drive Train}
[clockwise from=0]
child[grow=-90] {
node {Vibration}
child[grow=-90] {node {accel\-eration}} % note \- to indicate hyphenation point
}
child[grow=150,concept color=blue!50] {
node {Loads}
[clockwise from=0]
child[grow=-150,concept color=blue!50] {node {Fatigue}}
}
child[grow=30,concept color=blue!50] {node {Oil Particles}}
}
;
\end{tikzpicture}
\end{document}