添加坐标系 - 为树元素添加三个轴

添加坐标系 - 为树元素添加三个轴

我想为当前的三维树元素添加一些功能。

在此处输入图片描述

我想

  1. 将三个未标记节点标记为 (i, j - 1, k)、(i, j, k) 和 (i, j + 1, k)。我试过了,但它们太大了,无法容纳,弄乱了树。
  2. 从 (i, j, k - 1) 到 (i, j, k + 1) 绘制虚线;从 (i, j - 1, k) 到 (i, j + 1, k) 绘制虚线。
  3. 添加三个轴(可能是蓝色)——x、y、z,每个轴上有与节点对应的三个值。

结果可能如下所示:

在此处输入图片描述

非常感谢!我正在使用这个答案中的代码:

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{positioning, quotes, shapes.geometric}
% Code from https://tex.stackexchange.com/q/389916/2693

\begin{document}

\begin{tikzpicture}[
node distance = 6mm and 22mm,
dot/.style = {circle, fill = black,inner sep=0pt,minimum size=4pt, node contents={}},
every label/.style = {inner sep=1pt, font=\footnotesize}
]
\node (t) [trapezium,
fill=gray!20, draw, dashed,
minimum width=44mm, minimum height=11mm,
rotate=-90] {};%shape border

%
\node (r01)[dot,below left=of t.south,
label=above left:{$(i, j, k)$}];
%
\node (r11)[dot, at={(t.bottom left corner)},
label=60:{$(i, j - 1, k + 1)$}];
\node (r12)[dot, at={(t.west)},
label=60:{$(i, j , k + 1)$}];
\node (r13)[dot, at={(t.top left corner)},
label=60:{$(i, j + 1 , k + 1)$}];
%
\node (r21)[dot, at={(t.south)}];
\node (r22)[dot, at={(t.center)}];
\node (r23)[dot, at={(t.north)}];

%
\node (r31)[dot, at={(t.bottom right corner)},
label=-60:{$(i, j - 1, k - 1)$}];
\node (r32)[dot, at={(t.east)},
label=-60:{$(i, j , k - 1)$}];
\node (r33)[dot, at={(t.top right corner)},
label=-60:{$(i, j  + 1, k - 1)$}];
%


\draw[->]
(r01) edge [sloped] (r11)
(r01) edge [sloped] (r12)
(r01) edge [sloped] (r13)
%
(r01) edge [sloped] (r21)
(r01) edge [sloped] (r22)
(r01) edge [sloped] (r23)
%
(r01) edge [sloped] (r31)
(r01) edge [sloped] (r32)
(r01) edge [sloped] (r33)
;

\end{tikzpicture}

\end{document}

相关内容