连接多个思维导图的想法在视觉上对应于(这里和点击此处了解详情)
节点的完整性(命名、连接……)得以保持。
有问题
我尝试创建一个复杂的思维导图来描述课程。但是,我想用多个网格(一个在另一个之上/旁边)来解释多个复杂程度,例如网格
我尝试在其中输入思维导图的图像,includegraphics
但这并不令人满意,因为我想将一个思维导图的节点连接到另一个思维导图。
% Author: Rudolf Siegel
\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\tikzset{
basefont/.style = {font = \LARGE\sffamily},
timing/.style = {basefont, sloped,above,},
label/.style = {basefont, align = left},
screen/.style = {basefont,
black!80,
align = center,
minimum size = 6cm,
fill = gray!10,
draw = gray}};
% macro for defining screens
\newcommand*{\screen}[4]{%
\begin{scope}[xshift =#3, yshift = #4,
every node/.append style = {yslant = 0.33},
yslant = 0.33,
local bounding box = #1]
\node[screen] at (3cm,3cm) {#2};
\end{scope}
}
% define several screens
\screen{frame1, fill = blue!40}{\includegraphics[width=9cm]{MWE1.pdf}
} {0}{0}
\screen{frame2, fill = blue!40,opacity=0.5}{
\includegraphics[width=9cm]{MWE2.pdf}} {150}{-60}
\coordinate [xshift=750,yshift=-300] (frame6);
\end{tikzpicture}
\end{document}
我尝试使用示波器并使用 tikzlibrary,positioning
但得到了奇怪的结果。
基于此思维导图思维导图MWE例如(或任何思维导图),创建上述图表的原理是什么?
MWE1.tex
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\begin{document}
\begin{tikzpicture}
[mindmap,
grow cyclic,
every node/.style=concept,
concept color=teal!40,
level 1/.append style={sibling angle=360/4},
level 2/.append style={sibling angle=37.5},
]
\node [root concept] {Malnutrition Level 1 analysis}
child [concept color=purple!40]{
node {Health Facility}
child { node {Inadequate ANC Care} }
child { node {Long Distance of Health Care Facility} }
child { node {Insufficient Health Service} }
child { node {Incomplete Immunization} }
}
child [concept color=pink!40, rotate=-10]{
node {Morbidity}
child { node {Intestinal Diseases} }
child { node {Congenital Anomalies} }
}
child [concept color=green!40, rotate=-20]{
node {Maternal Health}
child { node {Maternal malnutrition} }
child { node {Higher Birth order} }
child { node {Short birth interval} }
child { node {Adolescent mother} }
}
child [concept color=red!40, rotate=-10]{
node {Cultural Factors}[counterclockwise from=-115]
child { node {Adverse cultural practice} }
child { node {Traditional beliefs} }
child { node {Early marriage} }
child { node {Inadequate child care} }
child { node {Feeding practices} }
}
;
\end{tikzpicture}
\end{document}
MWE2.tex
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\begin{document}
\begin{tikzpicture}
[mindmap,
grow cyclic,
every node/.style=concept,
concept color=teal!40,
level 1/.append style={sibling angle=360/4},
level 2/.append style={sibling angle=37.5},
]
\node [root concept] {Malnutrition Level 2 analysis}
child [concept color=red!40, rotate=-10]{
node {Cultural Factors}[counterclockwise from=-115]
child { node {Adverse cultural practice} }
child { node {Traditional beliefs} }
child { node {Early marriage} }
child { node {Inadequate child care} }
child { node {Feeding practices} }
}
child [concept color=blue!40, rotate=-7.5]{
node {Socio-demographic Factors}
child { node {Caste (ST/SC)} }
child { node {Illiteracy} }
child { node {Lack of Awareness about Nutrition} }
child { node {Occupation} }
child { node {Low Socio-Economic Status} }
child { node {Inadequate access to food} }
}
child [concept color=yellow!40, rotate=-5]{
node {Biological Factors}%[clockwise from=45, level distance=8cm]
child { node {Female} }
child { node {Low Birth Weight} }
child { node {Age of the Child} }
}
child [concept color=violet!40, rotate=-5] {
node {Environmental Factors}
child { node {Poor Unsafe Drinking Water} }
child { node {Poor Personal Hygiene} }
child { node {Poor Sanitation} }
child { node {Open Field Defecation} }
}
;
\end{tikzpicture}
\end{document}
答案1
您可以以将思维导图放入\savebox
es 为代价来绘制此配置。如果这样做,您将失去命名节点并用线连接它们的可能性。更准确地说,这将变得更加困难。我能够通过读取变换矩阵和移位并将它们应用于未变换的坐标来“恢复”坐标。(请记住,坐标tikz
始终是全局的,因此即使我们使用,也会有一些信息,\saveboxes
因为此时坐标\savebox
被“填充”,坐标被存储/广播。)结果远非完美,但您现在可以说
\draw[blue,thick,reconstruct=from HF to CF];
其中CF
和HF
是思维导图中的命名节点。不要期望太多。
\documentclass[border=3.14mm]{standalone}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{mindmap,3d,backgrounds,calc}
\newsavebox\MindMapA
\newsavebox\MindMapB
\begin{document}
\savebox\MindMapA{\begin{tikzpicture}[mindmap,transparency group,
grow cyclic,
every node/.style=concept,
concept color=teal!40,
level 1/.append style={sibling angle=360/4},
level 2/.append style={sibling angle=37.5},
]
\node [root concept] {Malnutrition Level 1 analysis}
child [concept color=purple!40]{
node [alias=HF] {Health Facility}
child { node {Inadequate ANC Care} }
child { node {Long Distance of Health Care Facility} }
child { node {Insufficient Health Service} }
child { node {Incomplete Immunization} }
}
child [concept color=pink!40, rotate=-10]{
node [alias=Morb] {Morbidity}
child { node {Intestinal Diseases} }
child { node {Congenital Anomalies} }
}
child [concept color=green!40, rotate=-20]{
node {Maternal Health}
child { node {Maternal malnutrition} }
child { node {Higher Birth order} }
child { node {Short birth interval} }
child { node {Adolescent mother} }
}
child [concept color=red!40, rotate=-10]{
node {Cultural Factors}[counterclockwise from=-115]
child { node {Adverse cultural practice} }
child { node {Traditional beliefs} }
child { node {Early marriage} }
child { node {Inadequate child care} }
child { node {Feeding practices} }
}
;
\end{tikzpicture}}
\savebox\MindMapB{\begin{tikzpicture}[mindmap,transparency group,
grow cyclic,
every node/.style=concept,
concept color=teal!40,
level 1/.append style={sibling angle=360/4},
level 2/.append style={sibling angle=37.5},
]
\node [root concept] {Malnutrition Level 2 analysis}
child [concept color=red!40, rotate=-10]{
node [alias=CF] {Cultural Factors}[counterclockwise from=-115]
child { node {Adverse cultural practice} }
child { node {Traditional beliefs} }
child { node {Early marriage} }
child { node {Inadequate child care} }
child { node {Feeding practices} }
}
child [concept color=blue!40, rotate=-7.5]{
node [alias=Socio] {Socio-demographic Factors}
child { node {Caste (ST/SC)} }
child { node {Illiteracy} }
child { node {Lack of Awareness about Nutrition} }
child { node {Occupation} }
child { node {Low Socio-Economic Status} }
child { node {Inadequate access to food} }
}
child [concept color=yellow!40, rotate=-5]{
node {Biological Factors}%[clockwise from=45, level distance=8cm]
child { node {Female} }
child { node {Low Birth Weight} }
child { node {Age of the Child} }
}
child [concept color=violet!40, rotate=-5] {
node {Environmental Factors}
child { node {Poor Unsafe Drinking Water} }
child { node {Poor Personal Hygiene} }
child { node {Poor Sanitation} }
child { node {Open Field Defecation} }
}
;
\end{tikzpicture}}
\tikzset{halo/.style={insert path={
([xshift=-2em,yshift=-2em]#1.south west) --
([xshift=2em,yshift=-2em]#1.south east) --
([xshift=2em,yshift=2em]#1.north east) --
([xshift=-2em,yshift=2em]#1.north west) -- cycle}}}
\tdplotsetmaincoords{105}{120}
\begin{tikzpicture}
\begin{scope}[tdplot_main_coords]
\begin{scope}[canvas is yz plane at x=4,transform shape]
\node[opacity=0.8] (MMA) {\usebox\MindMapA};
\begin{scope}[on background layer]
\fill[gray!30,opacity=0.2,halo=MMA];
\end{scope}
%\pgftransforminvert
\pgfgettransformentries{\tmpa}{\tmpb}{\tmpc}{\tmpd}{\tmpe}{\tmpf}
\begin{scope}[reconstruct/.style args={from #1 to #2}{insert path={
let \p1=(#1),\p2=(#2),
\n1={\tmpa*\x1+\tmpc*\y1+\tmpe},\n2={\tmpb*\x1+\tmpd*\y1+\tmpf},
\n3={\tmpa*\x2+\tmpc*\y2-\tmpe},\n4={\tmpb*\x2+\tmpd*\y2-\tmpf}
in (\n1,\n2) -- (\n3,\n4)
}}]
\draw[blue,thick,reconstruct=from HF to CF];
\draw[red,thick,shorten <=6pt,reconstruct=from Morb to Socio];
\end{scope}
\end{scope}
%
\begin{scope}[canvas is yz plane at x=-4,transform shape]
\node[opacity=0.8] (MMB) {\usebox\MindMapB};
\begin{scope}[on background layer]
\fill[gray!30,opacity=0.2,halo=MMB];
\end{scope}
\end{scope}
\end{scope}
%
\end{tikzpicture}
\end{document}
请注意,我们在将思维导图放在前面之前绘制了连接,这“证明”坐标是在调用命令时设置的\savebox
,而不是在实际使用命令时设置的。还请注意,为了实现这一点,我们需要对称地移动平面,即当一个平面有时,canvas is yz plane at x=4,
另一个平面必须随之移动canvas is yz plane at x=-4,
(而不是,比如说x=-6
)。