如何使用 TikZ 创建如下所示的 McKelvey 资源分类图?
答案1
这是一次初步尝试,希望能够示例出主要步骤。
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[generaloptions/.style 2 args={
draw,thick,inner sep=0,outer sep=0,minimum height=#1,minimum width=#2
}]
\node[generaloptions={2.5cm}{3cm},fill=blue!50!black] (big) at (0,0) {};
\node[generaloptions={1cm}{1.5cm},anchor=south west,fill=yellow] (y1) at (big.north west) {};
\node[generaloptions={1cm}{1.5cm},anchor=south east,fill=yellow] (y2) at (big.north east) {};
\node[generaloptions={0.75cm}{1.5cm},anchor=south west,fill=red] (r1) at (y1.north west) {};
\node[generaloptions={0.75cm}{1.5cm},anchor=south east,fill=red] (r2) at (y2.north east) {};
\node[scale=0.8,rotate=30] (rotlab) at (y1.north east) {RESOURCE};
\node[rotate=90,scale=0.3] at ([xshift=-1mm]r1.west) {\textit{ECONOMIC}};
\coordinate (lu) at ([xshift=-1cm]r1.north west);
\coordinate (ll) at ([xshift=-1cm]big.south west);
\coordinate (lm1) at ([xshift=-0.5cm]y1.south west);
\draw[shorten >=1mm] (lu) -- (r1.north west);
\draw[shorten >=1mm] (ll) -- (big.south west);
\draw[shorten >=1mm] (lm1) -- (y1.south west);
\draw[latex-latex,shorten <=0.5mm,shorten >=0.5mm] ([xshift=1mm]ll) --
([xshift=1mm]lu) node[sloped,fill=white,pos=0.5,scale=0.5] {\textit{RESOURCE BASE}};
\end{tikzpicture}
\end{document}
答案2
经过反复尝试,我得到了这个结果:
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[generaloptions/.style 2 args={
draw,thick,inner sep=0,outer sep=0,minimum height=#1,minimum width=#2
}]
\node[generaloptions={5cm}{9cm},fill=blue!50!black] (big) at (0,0) {};
\node[generaloptions={2.5cm}{4.5cm},anchor=south west,fill=yellow] (y1) at (big.north west) {};
\node[generaloptions={2.5cm}{4.5cm},anchor=south east,fill=yellow] (y2) at (big.north east) {};
\node[generaloptions={1.75cm}{4.5cm},anchor=south west,fill=orange] (r1) at (y1.north west) {};
\node[generaloptions={1.75cm}{4.5cm},anchor=south east,fill=orange] (r2) at (y2.north east) {};
\node[generaloptions={1.75cm}{4.5cm},anchor=south west,fill=red] (s1) at (r1.north west) {};
\node[generaloptions={1.75cm}{4.5cm},anchor=south east,fill=orange] (s2) at (r2.north east) {};
\node[scale=0.8,rotate=45] (rotlab) at (r1.north east) {\textbf{RESOURCE}};
\node[rotate=90,scale=0.4] at ([xshift=-1mm]s1.west) {\textit{ECONOMIC}};
\node[rotate=90,scale=0.4] at ([xshift=-1mm]r1.west) {\textit{SUB ECONOMIC}};
\coordinate (lu) at ([xshift=-1.5cm]s1.north west);
\coordinate (ll) at ([xshift=-1.5cm]big.south west);
\coordinate (lm1) at ([xshift=-0.5cm]y1.south west);
\coordinate (lm2) at ([xshift=-1.5cm]y1.south west);
\coordinate (lm3) at ([xshift=-1.0cm]y1.north west);
\coordinate (lv) at ([yshift=0.5cm]s1.north west);
\coordinate (rv) at ([yshift=0.5cm]s2.north east);
\coordinate (mvl) at ([xshift=4.5cm]s1.north west);
\coordinate (mvu) at ([yshift=0.5cm, xshift=4.5cm]s1.north west);
\coordinate (mmvl) at ([yshift=1.0cm, ]s1.north west);
\coordinate (mmvr) at ([yshift=1.0cm, ]s2.north east);
\draw[shorten <=1mm] (s1.north west) -- (lv);
\draw[shorten <=1mm] (s2.north east) -- (rv);
\draw[shorten <=1mm] (mvl) -- (mvu);
\draw[shorten >=1mm] (lu) -- (s1.north west);
\draw[shorten >=1mm] (ll) -- (big.south west);
\draw[shorten >=1mm] (lm2) -- (y1.south west);
\draw[shorten >=1mm] (lm3) -- (y1.north west);
\draw[latex-latex,shorten <=0.5mm,shorten >=0.5mm] ([xshift=1mm]ll) --
([xshift=1mm]lu) node[sloped,fill=white,pos=0.5,scale=0.9] {\textit{RESOURCE BASE}};
\draw[latex-latex,shorten <=0.5mm,shorten >=0.5mm] ([xshift=5mm]ll) --
([xshift=5mm]lm2) node[sloped,fill=white,pos=0.5,scale=0.7] {\textit{INACCESSIBLE}};
\draw[latex-latex,shorten <=0.5mm,shorten >=0.5mm] ([xshift=5mm]lm2) --
([xshift=5mm]lu) node[sloped,fill=white,pos=0.5,scale=0.7] {\textit{ACCESSIBLE}};
\draw[latex-latex,shorten <=0.5mm,shorten >=0.5mm] ([xshift=10mm]lm2) --
([xshift=5mm]lm3) node[sloped,fill=white,pos=0.5,scale=0.6] {\textit{RESIDUAL}};
\draw[latex-latex,shorten <=0.5mm,shorten >=0.5mm] ([xshift=5mm]lm3) --
([xshift=10mm]lu) node[sloped,fill=white,pos=0.5,scale=0.6] {\textit{USEFUL}};
\draw[latex-latex,shorten <=0.5mm,shorten >=0.5mm] ([yshift=-2mm]lv) --
([yshift=-2mm]mvu) node[sloped,fill=white,pos=0.5,scale=0.6] {\textit{IDENTIFIED}};
\draw[latex-latex,shorten <=0.5mm,shorten >=0.5mm] ([yshift=-2mm]mvu) --
([yshift=-2mm]rv) node[sloped,fill=white,pos=0.5,scale=0.6] {\textit{UNDISCOVERED}};
\draw[latex-latex, thick, shorten <=5mm] ([yshift=-2.5mm]mmvl) --
([yshift=2.5mm]mvu) node[sloped,fill=white,pos=1.0,scale=1] {\textit{\textbf{GEOLOGICAL ASSURANCE}}};
\draw[latex-latex, thick, shorten <=25mm] ([xshift=11cm]ll) --
([xshift=10cm]lm1) node[sloped,fill=white,pos=1.0,scale=1] {\textit{\textbf{COST/DEPTH}}};
\end{tikzpicture}
\end{document