如何减小思维导图中单个节点的大小?

如何减小思维导图中单个节点的大小?

tikzmindmap,我想更改单个父节点或子节点(而不是整个系统)的大小。只需引入选项concept,即可增加子节点的大小。minimum sizeconcept

concept由于 tikz 不支持,如何减小单个尺寸maximum size

答案1

scale您可以通过设置来决定节点:

\tikzset{every node/.append style={scale=0.6}}

然后在您感兴趣的节点中本地重新定义缩放。

例如:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{mindmap}

\tikzset{level 1 concept/.append style={font=\sf, sibling angle=90,level distance = 25mm}}
\tikzset{level 2 concept/.append style={font=\sf, sibling angle=45,level distance = 15mm}}
\tikzset{level 3 concept/.append style={font=\sf, sibling angle=45,level distance = 15mm}}
\tikzset{every node/.append style={scale=0.6}}

\begin{document}
\begin{tikzpicture}[mindmap, concept color=blue, font=\sf\bf, text=white]
\node[concept]{Root Concept}[clockwise from=315]
                        child[concept color=orange] {node[concept] (c1){Child 1}                                
                                    child [concept color=orange]  {node [concept](c11){Child 1-1}}
                                    child [concept color=orange] {node [concept](c12){Child 1-2}}
                                    child [concept color=orange] {node [concept](c13){Child 1-3}}                                                   
                        }
                        child [concept color=orange] {node [concept](c2){Child 2}
                                    child [concept color=orange] {node [concept,scale=0.4](c21){Child 2-1}}
                                    child [concept color=orange] {node [concept](c22){Child 2-2}}
                                    child [concept color=orange] {node [concept](c22){Child 1-3}}
                        };
\end{tikzpicture}
\end{document}

会给你:

在此处输入图片描述

注意局部重新定义:

child [concept color=orange] {node [concept,scale=0.4](c21){Child 2-1}}

答案2

我认为最好是局部改变字体大小而不是改变比例

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
\node[circle,draw,minimum size=3em,text width=3em](a) at (0,0){aaaa};
\begin{scope}\small
\node[circle,draw,minimum size=3em,text width=3em](b) at (4,1){aaaa aaaaa};
\end{scope}
\draw(a) -- (b);
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容