![填充思维导图节点时出现的问题](https://linux22.com/image/412018/%E5%A1%AB%E5%85%85%E6%80%9D%E7%BB%B4%E5%AF%BC%E5%9B%BE%E8%8A%82%E7%82%B9%E6%97%B6%E5%87%BA%E7%8E%B0%E7%9A%84%E9%97%AE%E9%A2%98.png)
我正在尝试为我的思维导图中非根节点内的颜色,就像 PGF 手册对根概念所做的那样。但它从来没有做任何事情来填充节点内部并为我的思维导图创建边框。感谢您的帮助。另外,请告诉我 2019 年发布的手册中是否有关于此问题解决方案的信息。
这是我的代码
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{tikz}
\usetikzlibrary{mindmap,trees,decorations.pathmorphing}
\usepackage{fullpage}
\title{mindmaps}
\author{creator}
\date{\today}
\begin{document}
\maketitle
\begin{center}
\begin{tikzpicture}
[
mindmap,
every node/.style={concept, execute at begin node=\hskip0pt},
root concept/.append style={
concept color=black,fill=white,line width=1ex,text=black
},
text=white,
grow cyclic,
level 1 concept/.append style={
level distance=4.5cm,sibling angle=120,
concept color=red!50!green!40, fill={white}, text=white, line width=1ex
},
level 2 concept/.append style={
level distance=3.5cm,sibling angle=35, concept color =red!50, fill= white
}
]
%\clip(0,-1)rectangle++(4,5);
\node[root concept]{$2^{nd}-Oreder PDEs$}
child
{
node[concept]{$\Delta > 0$}
{
child{node{Hyperbolic}}
}
}
child
{
node{$\Delta = 0$}
{
child{node{Parabolic}}
}
}
child
{
node{$\Delta < 0$}
{
child{node{Elliptic}}
}
};
\end{tikzpicture}
\end{center}
\end{document}
这就是我得到的
答案1
子节点和子节点“内部”的节点之间存在细微但重要的区别。您需要将 color 概念传递给 renchild
和 drop fill=white
。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{tikz}
\usetikzlibrary{mindmap,trees,decorations.pathmorphing}
\usepackage{fullpage}
\title{mindmaps}
\author{creator}
\date{\today}
\begin{document}
\maketitle
\begin{center}
\begin{tikzpicture}
[
mindmap,
every node/.style={concept, execute at begin node=\hskip0pt},
root concept/.append style={
concept color=black, line width=1ex,text=white
},
text=white,
grow cyclic,
level 1 concept/.append style={
level distance=4.5cm,sibling angle=120,
every child/.append style={concept color=red!50!green!40}, text=white, line width=1ex
},
level 2 concept/.append style={
level distance=3.5cm,sibling angle=35,
every child/.append style={concept color =red!50}
}
]
%\clip(0,-1)rectangle++(4,5);
\node[root concept]{2\textsuperscript{nd} order PDEs}
child
{
node[concept]{$\Delta > 0$}
{
child{node{Hyperbolic}}
}
}
child
{
node{$\Delta = 0$}
{
child{node{Parabolic}}
}
}
child
{
node{$\Delta < 0$}
{
child{node{Elliptic}}
}
};
\end{tikzpicture}
\end{center}
\end{document}
至于您的评论:也许是这样?
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{tikz}
\usetikzlibrary{mindmap,trees,decorations.pathmorphing}
\usepackage{fullpage}
\title{mindmaps}
\author{creator}
\date{\today}
\begin{document}
\maketitle
\begin{center}
\begin{tikzpicture}
[
mindmap,
every node/.style={concept,text=black,fill=white, execute at begin node=\hskip0pt},
root concept/.append style={
concept color=black, line width=1ex,fill=white
},
%text=white,
grow cyclic,
level 1 concept/.append style={
level distance=4.5cm,sibling angle=120,
every child/.append style={concept color=red!50!green!40},
},
level 2 concept/.append style={
level distance=3.5cm,sibling angle=35,
every child/.append style={concept color =red!50},
}
]
%\clip(0,-1)rectangle++(4,5);
\node[root concept]{2\textsuperscript{nd} order PDEs}
child
{
node{$\Delta > 0$}
{
child{node{Hyperbolic}}
}
}
child
{
node{$\Delta = 0$}
{
child{node{Parabolic}}
}
}
child
{
node{$\Delta < 0$}
{
child{node{Elliptic}}
}
};
\end{tikzpicture}
\end{center}
\end{document}