答案1
这是我的建议(请看一下这里)
\documentclass[tikz,border=5mm]{standalone}
\begin{document}
\begin{tikzpicture}[c/.style={circle,fill=magenta,outer sep=1.5pt,inner sep=1.5pt}]
\def\plane{(0,0)--(2,0)--++(55:1.4)--+(180:2)}
\begin{scope}
\fill[blue!10] \plane;
\path (1.3,.6) node[c] (Bx) {} node[below]{$Bx$};
\end{scope}
\begin{scope}[xshift=4cm]
\fill[blue!10] \plane;
\path (1.2,.8) node[c] (ABx) {} node[below right]{$ABx$};
\end{scope}
\begin{scope}[xshift=-4cm]
\fill[blue!10] \plane;
\path (1.2,.8) node[c] (x) {} node[left]{$x$};
\end{scope}
\draw[-stealth] (x) to[bend left=45]
node[midway,above]{Multiplication}
node[midway,below]{by $B$} (Bx);
\draw[-stealth] (Bx) to[bend left=45]
node[midway,above]{Multiplication}
node[midway,below]{by $A$} (ABx);
\end{tikzpicture}
\end{document}
答案2
利用两个循环和一些样式,我们可以相对轻松地绘制这样的图表。
通过xslant
ing 我们可以使用正常的rectangle
路径操作绘制平行四边形。选项x
和y
指定X和是单位和在这里用于缩放矩形。这些选项仅对有效,我们通常不希望像整个图片那样进行变换。(x, y)
scope
xslant
另一个循环是放置点(相对于矩形的左下角),因为我们使用shift
循环参数。
quotes
然后使用该库沿路径放置节点. (如果您想要所需的节点有多个选项{}
,即"by $B$" {below, red}
.)
代码
\documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta,quotes,chains}
\begin{document}
\begin{tikzpicture}[
rect/.style = {fill = cyan!70!gray!25},
dot/.style = {shape = circle, fill = black, draw=none, inner sep=1pt},
conn/.style = {-Stealth, bend left = 55, nodes = {node font=\scriptsize},
shorten > = 3\pgflinewidth, shorten < = 3\pgflinewidth},
]
\begin{scope}[xslant = .6, x = 2cm, y = 2cm]
\foreach \sh in {0,2,4} \path[rect, shift = (0:\sh)] (0,0) rectangle (1,.75);
\foreach \p/\pos/\l[count = \sh from 0] in {(.5, .5) / left / x,
(.5, .5) / below / Bx,
(.3, .5) / right / A(Bx)}
\node[shift = (0:2*\sh), dot, label = \pos:$\l$] (dot-\sh) at \p {};
\end{scope}
\path[conn] (dot-0) edge["Multiplication" above, "by $B$" below] (dot-1)
(dot-1) edge["Multiplication" above, "by $A$" below] (dot-2);
\end{tikzpicture}
\end{document}