我想咨询如何创建类似于下面右图的画面。(我更喜欢右边的,但左边的也可以接受。)
我不确定如何消除一些网格线。我尝试了下面提供的任务中的第五张图,但我发现构建图表的左侧部分很困难。
答案1
我不会使用该ytableau
包,因为我不确定是否可以用它删除内边框。此外,您想在彩色区域内放置一些标签,这可能也很难用该ytableau
包实现。相反,您可以简单地使用 Ti 绘制它钾Z,例如这样:
\documentclass[border=10pt, tikz]{standalone}
\tikzset{
cell/.style={
anchor=south west,
draw,
minimum size=1cm,
},
}
\begin{document}
\begin{tikzpicture}
\node[cell] at (0,0) {1};
\node[cell] at (0,1) {2};
\node[cell, minimum height=3cm] at (0,2) {$\vdots$};
\node[cell] at (0,5) {$k$};
\node[cell, minimum height=3cm] at (0,6) {$\vdots$};
\node[cell] at (0,9) {$n$};
\node[cell] at (3,2) {$a$};
\draw[fill=cyan!50] (1,0) |- (3,3) |- (6,2) |- cycle;
\node[cell, draw=none] at (2.5,0.5) {first part};
\draw (1,3) |- (6,6) |- (4,2) |- cycle;
\node[cell, draw=none] at (2.5,4) {second part};
\draw[fill=yellow!50] (1,6) rectangle (6,10);
\node[cell, draw=none] at (2.5,7.5) {third part};
\end{tikzpicture}
\begin{tikzpicture}
\node[cell] at (0,0) {1};
\node[cell] at (0,1) {2};
\node[cell, minimum height=3cm] at (0,2) {$\vdots$};
\node[cell] at (0,5) {$k$};
\node[cell, minimum height=3cm] at (0,6) {$\vdots$};
\node[cell] at (0,9) {$n$};
\node[cell] at (3,2) {$a$};
\draw[fill=cyan!50] (1,0) |- (3,3) |- (6,2) |- cycle;
\node[cell, draw=none] at (2.5,0.5) {first part};
\draw (1,3) |- (6,6) |- (7,5) |- (5,4) |- (4,2) |- cycle;
\node[cell, draw=none] at (2.5,4) {second part};
\draw[fill=yellow!50] (1,6) |- (10,10) |- (8,9) |- (9,8) |- (7,7) |- cycle;
\node[cell, draw=none] at (2.5,7.5) {third part};
\end{tikzpicture}
\end{document}