![如何绘制一幅年轻画面,其中部分网格线消失](https://linux22.com/image/473217/%E5%A6%82%E4%BD%95%E7%BB%98%E5%88%B6%E4%B8%80%E5%B9%85%E5%B9%B4%E8%BD%BB%E7%94%BB%E9%9D%A2%EF%BC%8C%E5%85%B6%E4%B8%AD%E9%83%A8%E5%88%86%E7%BD%91%E6%A0%BC%E7%BA%BF%E6%B6%88%E5%A4%B1.png)
我想咨询如何创建类似于下面右图的画面。(我更喜欢右边的,但左边的也可以接受。)
我不确定如何消除一些网格线。我尝试了下面提供的任务中的第五张图,但我发现构建图表的左侧部分很困难。
答案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}