是否可以将该图形的底部淡化/阴影化为白色?
\documentclass[tikz]{standalone}
\usetikzlibrary{matrix}
\usetikzlibrary{backgrounds}
\usetikzlibrary{shapes}
\usetikzlibrary{tikzmark}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}[remember picture]
\node [anchor=west] (Y0) at (0, 0) {$Y^0 = \{$
\quad
\subnode[anchor=base]{yc-0-1}{$y_1$}, \qquad \quad \quad \quad
\subnode{yc-0-2}{$y_2$}, \qquad \quad \quad \quad
\subnode{yc-0-3}{$y_3$}, \qquad \quad \quad \quad
\subnode{yc-0-4}{$y_4$} \quad
\subnode{brktc0}{$ \}$}
};
\node [anchor=west] (Y1) at (0, -2.5) {$Y^1 = \{$
\subnode{yc-1-1}{$\overbrace{\{y_1, y_2\}}^{y^1_1}$}, \
\subnode{yc-1-2}{$\overbrace{\{y_1, y_3\}}^{y^1_2}$}, \
\subnode{yc-1-3}{$\overbrace{\{y_1, y_4\}}^{y^1_3}$}, \
\subnode{yc-1-4}{$\overbrace{\{y_2, y_3\}}^{y^1_4}$}, \
\subnode{yc-1-5}{$\overbrace{\{y_2, y_4\}}^{y^1_5}$}, \
\subnode{yc-1-6}{$\overbrace{\{y_3, y_4\}}^{y^1_6}$}
\subnode{brktc1}{$ \}$}
};
\begin{scope}[decoration={markings, mark=at position 0.85 with {\arrow{>}}}]
\draw[postaction={decorate}, gray!20] (yc-0-4.south) to (yc-1-6.north);
\draw[postaction={decorate}, gray!20] (yc-0-4.south) to (yc-1-5.north);
\draw[postaction={decorate}, gray!20] (yc-0-4.south) to (yc-1-3.north);
\draw[postaction={decorate}, gray!40] (yc-0-3.south) to (yc-1-6.north);
\draw[postaction={decorate}, gray!40] (yc-0-3.south) to (yc-1-4.north);
\draw[postaction={decorate}, gray!40] (yc-0-3.south) to (yc-1-2.north);
\draw[postaction={decorate}, gray!70] (yc-0-2.south) to (yc-1-5.north);
\draw[postaction={decorate}, gray!70] (yc-0-2.south) to (yc-1-4.north);
\draw[postaction={decorate}, gray!70] (yc-0-2.south) to (yc-1-1.north);
\draw[postaction={decorate}] (yc-0-1.south) to (yc-1-2.north);
\draw[postaction={decorate}] (yc-0-1.south) to (yc-1-3.north);
\draw[postaction={decorate}] (yc-0-1.south) to (yc-1-1.north);
\end{scope}
\node [anchor=west] (Y2) at (0, -5) {$Y^2 = \{$
\subnode{yc-2-1}{$\overbrace{\{y^1_1, y^1_2\}}^{y^2_1}$}, \
\subnode{yc-2-2}{$\overbrace{\{y^1_1, y^1_3\}}^{y^2_2}$}, \
\subnode{yc-2-3}{$\overbrace{\{y^1_1, y^1_4\}}^{y^2_3}$}, \
\subnode{yc-2-4}{$\overbrace{\{y^1_1, y^1_5\}}^{y^2_4}$}, \
\subnode{yc-2-5}{$\overbrace{\{y^1_1, y^1_6\}}^{y^2_5}$}, \
\dots
\subnode{yc-2-6}{$\overbrace{\{y^1_5, y^1_6\}}^{y^2_{15}}$}\
\subnode{brktc2}{$ \}$}
};
\begin{scope}[decoration={markings, mark=at position 0.85 with {\arrow{>}}}]
\draw[postaction={decorate}, gray!20] (yc-1-6.south) to (yc-2-6.north);
\draw[postaction={decorate}, gray!20] (yc-1-6.south) to (yc-2-5.north);
\draw[postaction={decorate}, gray!20] (yc-1-5.south) to (yc-2-6.north);
\draw[postaction={decorate}, gray!20] (yc-1-5.south) to (yc-2-4.north);
\draw[postaction={decorate}, gray!30] (yc-1-4.south) to (yc-2-3.north);
\draw[postaction={decorate}, gray!40] (yc-1-3.south) to (yc-2-2.north);
\draw[postaction={decorate}, gray!70] (yc-1-2.south) to (yc-2-1.north);
\draw[postaction={decorate}] (yc-1-1.south) to (yc-2-4.north);
\draw[postaction={decorate}] (yc-1-1.south) to (yc-2-5.north);
\draw[postaction={decorate}] (yc-1-1.south) to (yc-2-3.north);
\draw[postaction={decorate}] (yc-1-1.south) to (yc-2-2.north);
\draw[postaction={decorate}] (yc-1-1.south) to (yc-2-1.north);
\end{scope}
\node [anchor=west] (Y3) at (0, -7.5) {$Y^3 = \{$
\subnode{yc-3-1}{$\overbrace{\{y^2_1, y^2_2\}}^{y^3_1}$}, \
\subnode{yc-3-2}{$\overbrace{\{y^2_1, y^2_3\}}^{y^3_2}$}, \
\subnode{yc-3-3}{$\overbrace{\{y^2_1, y^2_4\}}^{y^3_3}$}, \
\subnode{yc-3-4}{$\overbrace{\{y^2_1, y^2_5\}}^{y^3_4}$}, \
\subnode{yc-3-5}{$\overbrace{\{y^2_1, y^2_6\}}^{y^3_5}$}, \
\dots
\subnode{yc-3-6}{$\overbrace{\{y^2_{14}, y^2_{15}\}}^{y^3_{105}}$}\
\subnode{brktc3}{$ \}$}
};
\begin{scope}[decoration={markings, mark=at position 0.85 with {\arrow{>}}}]
\draw[postaction={decorate}, gray!20] (yc-2-6.south) to (yc-3-6.north);
\draw[postaction={decorate}, gray!20] (yc-2-6.south) to (yc-3-5.north);
\draw[postaction={decorate}, gray!20] (yc-2-5.south) to (yc-3-6.north);
\draw[postaction={decorate}, gray!20] (yc-2-5.south) to (yc-3-4.north);
\draw[postaction={decorate}, gray!30] (yc-2-4.south) to (yc-3-3.north);
\draw[postaction={decorate}, gray!40] (yc-2-3.south) to (yc-3-2.north);
\draw[postaction={decorate}, gray!70] (yc-2-2.south) to (yc-3-1.north);
\draw[postaction={decorate}] (yc-2-1.south) to (yc-3-4.north);
\draw[postaction={decorate}] (yc-2-1.south) to (yc-3-5.north);
\draw[postaction={decorate}] (yc-2-1.south) to (yc-3-3.north);
\draw[postaction={decorate}] (yc-2-1.south) to (yc-3-2.north);
\draw[postaction={decorate}] (yc-2-1.south) to (yc-3-1.north);
\end{scope}
\node [anchor=west] (Y4) at (0, -10) {$Y^4 = \{$
\subnode{yc-4-1}{$\overbrace{\{y^3_1, y^3_2\}}^{y^4_1}$}, \
\subnode{yc-4-2}{$\overbrace{\{y^3_1, y^3_3\}}^{y^4_2}$}, \
\subnode{yc-4-3}{$\overbrace{\{y^3_1, y^3_4\}}^{y^4_3}$}, \
\subnode{yc-4-4}{$\overbrace{\{y^3_1, y^3_5\}}^{y^4_4}$}, \
\subnode{yc-4-5}{$\overbrace{\{y^3_1, y^3_6\}}^{y^4_5}$}, \
\dots
\subnode{yc-4-6}{$\overbrace{\{y^3_{104}, y^3_{105}\}}^{y^4_{5460}}$}\
\subnode{brktc4}{$ \}$}
};
\begin{scope}[decoration={markings, mark=at position 0.85 with {\arrow{>}}}]
\draw[postaction={decorate}, gray!20] (yc-3-6.south) to (yc-4-6.north);
\draw[postaction={decorate}, gray!20] (yc-3-6.south) to (yc-4-5.north);
\draw[postaction={decorate}, gray!20] (yc-3-5.south) to (yc-4-6.north);
\draw[postaction={decorate}, gray!20] (yc-3-5.south) to (yc-4-4.north);
\draw[postaction={decorate}, gray!30] (yc-3-4.south) to (yc-4-3.north);
\draw[postaction={decorate}, gray!40] (yc-3-3.south) to (yc-4-2.north);
\draw[postaction={decorate}, gray!70] (yc-3-2.south) to (yc-4-1.north);
\draw[postaction={decorate}] (yc-3-1.south) to (yc-4-4.north);
\draw[postaction={decorate}] (yc-3-1.south) to (yc-4-5.north);
\draw[postaction={decorate}] (yc-3-1.south) to (yc-4-3.north);
\draw[postaction={decorate}] (yc-3-1.south) to (yc-4-2.north);
\draw[postaction={decorate}] (yc-3-1.south) to (yc-4-1.north);
\end{scope}
\end{tikzpicture}
\end{document}
我想要得到这样的东西
答案1
使用这里的方法Tikz 淡入淡出透明度,因此背景在投影仪中可见?你可以生产
通过应用渐变
\documentclass[tikz]{standalone}
\usetikzlibrary{matrix}
\usetikzlibrary{backgrounds}
\usetikzlibrary{shapes}
\usetikzlibrary{tikzmark}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{fadings}
\tikzfading[name=myfade,
top color=transparent!100, bottom color=transparent!0]
\begin{document}
\begin{tikzpicture}[remember picture]
\node [anchor=west] (Y0) at (0, 0) {$Y^0 = \{$
\quad
\subnode[anchor=base]{yc-0-1}{$y_1$}, \qquad \quad \quad \quad
\subnode{yc-0-2}{$y_2$}, \qquad \quad \quad \quad
\subnode{yc-0-3}{$y_3$}, \qquad \quad \quad \quad
\subnode{yc-0-4}{$y_4$} \quad
\subnode{brktc0}{$ \}$}
};
\node [anchor=west] (Y1) at (0, -2.5) {$Y^1 = \{$
\subnode{yc-1-1}{$\overbrace{\{y_1, y_2\}}^{y^1_1}$}, \
\subnode{yc-1-2}{$\overbrace{\{y_1, y_3\}}^{y^1_2}$}, \
\subnode{yc-1-3}{$\overbrace{\{y_1, y_4\}}^{y^1_3}$}, \
\subnode{yc-1-4}{$\overbrace{\{y_2, y_3\}}^{y^1_4}$}, \
\subnode{yc-1-5}{$\overbrace{\{y_2, y_4\}}^{y^1_5}$}, \
\subnode{yc-1-6}{$\overbrace{\{y_3, y_4\}}^{y^1_6}$}
\subnode{brktc1}{$ \}$}
};
\begin{scope}[decoration={markings, mark=at position 0.85 with {\arrow{>}}}]
\draw[postaction={decorate}, gray!20] (yc-0-4.south) to (yc-1-6.north);
\draw[postaction={decorate}, gray!20] (yc-0-4.south) to (yc-1-5.north);
\draw[postaction={decorate}, gray!20] (yc-0-4.south) to (yc-1-3.north);
\draw[postaction={decorate}, gray!40] (yc-0-3.south) to (yc-1-6.north);
\draw[postaction={decorate}, gray!40] (yc-0-3.south) to (yc-1-4.north);
\draw[postaction={decorate}, gray!40] (yc-0-3.south) to (yc-1-2.north);
\draw[postaction={decorate}, gray!70] (yc-0-2.south) to (yc-1-5.north);
\draw[postaction={decorate}, gray!70] (yc-0-2.south) to (yc-1-4.north);
\draw[postaction={decorate}, gray!70] (yc-0-2.south) to (yc-1-1.north);
\draw[postaction={decorate}] (yc-0-1.south) to (yc-1-2.north);
\draw[postaction={decorate}] (yc-0-1.south) to (yc-1-3.north);
\draw[postaction={decorate}] (yc-0-1.south) to (yc-1-1.north);
\end{scope}
\node [anchor=west] (Y2) at (0, -5) {$Y^2 = \{$
\subnode{yc-2-1}{$\overbrace{\{y^1_1, y^1_2\}}^{y^2_1}$}, \
\subnode{yc-2-2}{$\overbrace{\{y^1_1, y^1_3\}}^{y^2_2}$}, \
\subnode{yc-2-3}{$\overbrace{\{y^1_1, y^1_4\}}^{y^2_3}$}, \
\subnode{yc-2-4}{$\overbrace{\{y^1_1, y^1_5\}}^{y^2_4}$}, \
\subnode{yc-2-5}{$\overbrace{\{y^1_1, y^1_6\}}^{y^2_5}$}, \
\dots
\subnode{yc-2-6}{$\overbrace{\{y^1_5, y^1_6\}}^{y^2_{15}}$}\
\subnode{brktc2}{$ \}$}
};
\begin{scope}[decoration={markings, mark=at position 0.85 with {\arrow{>}}}]
\draw[postaction={decorate}, gray!20] (yc-1-6.south) to (yc-2-6.north);
\draw[postaction={decorate}, gray!20] (yc-1-6.south) to (yc-2-5.north);
\draw[postaction={decorate}, gray!20] (yc-1-5.south) to (yc-2-6.north);
\draw[postaction={decorate}, gray!20] (yc-1-5.south) to (yc-2-4.north);
\draw[postaction={decorate}, gray!30] (yc-1-4.south) to (yc-2-3.north);
\draw[postaction={decorate}, gray!40] (yc-1-3.south) to (yc-2-2.north);
\draw[postaction={decorate}, gray!70] (yc-1-2.south) to (yc-2-1.north);
\draw[postaction={decorate}] (yc-1-1.south) to (yc-2-4.north);
\draw[postaction={decorate}] (yc-1-1.south) to (yc-2-5.north);
\draw[postaction={decorate}] (yc-1-1.south) to (yc-2-3.north);
\draw[postaction={decorate}] (yc-1-1.south) to (yc-2-2.north);
\draw[postaction={decorate}] (yc-1-1.south) to (yc-2-1.north);
\end{scope}
\node [anchor=west] (Y3) at (0, -7.5) {$Y^3 = \{$
\subnode{yc-3-1}{$\overbrace{\{y^2_1, y^2_2\}}^{y^3_1}$}, \
\subnode{yc-3-2}{$\overbrace{\{y^2_1, y^2_3\}}^{y^3_2}$}, \
\subnode{yc-3-3}{$\overbrace{\{y^2_1, y^2_4\}}^{y^3_3}$}, \
\subnode{yc-3-4}{$\overbrace{\{y^2_1, y^2_5\}}^{y^3_4}$}, \
\subnode{yc-3-5}{$\overbrace{\{y^2_1, y^2_6\}}^{y^3_5}$}, \
\dots
\subnode{yc-3-6}{$\overbrace{\{y^2_{14}, y^2_{15}\}}^{y^3_{105}}$}\
\subnode{brktc3}{$ \}$}
};
\begin{scope}[decoration={markings, mark=at position 0.85 with {\arrow{>}}}]
\draw[postaction={decorate}, gray!20] (yc-2-6.south) to (yc-3-6.north);
\draw[postaction={decorate}, gray!20] (yc-2-6.south) to (yc-3-5.north);
\draw[postaction={decorate}, gray!20] (yc-2-5.south) to (yc-3-6.north);
\draw[postaction={decorate}, gray!20] (yc-2-5.south) to (yc-3-4.north);
\draw[postaction={decorate}, gray!30] (yc-2-4.south) to (yc-3-3.north);
\draw[postaction={decorate}, gray!40] (yc-2-3.south) to (yc-3-2.north);
\draw[postaction={decorate}, gray!70] (yc-2-2.south) to (yc-3-1.north);
\draw[postaction={decorate}] (yc-2-1.south) to (yc-3-4.north);
\draw[postaction={decorate}] (yc-2-1.south) to (yc-3-5.north);
\draw[postaction={decorate}] (yc-2-1.south) to (yc-3-3.north);
\draw[postaction={decorate}] (yc-2-1.south) to (yc-3-2.north);
\draw[postaction={decorate}] (yc-2-1.south) to (yc-3-1.north);
\end{scope}
\node [anchor=west] (Y4) at (0, -10) {$Y^4 = \{$
\subnode{yc-4-1}{$\overbrace{\{y^3_1, y^3_2\}}^{y^4_1}$}, \
\subnode{yc-4-2}{$\overbrace{\{y^3_1, y^3_3\}}^{y^4_2}$}, \
\subnode{yc-4-3}{$\overbrace{\{y^3_1, y^3_4\}}^{y^4_3}$}, \
\subnode{yc-4-4}{$\overbrace{\{y^3_1, y^3_5\}}^{y^4_4}$}, \
\subnode{yc-4-5}{$\overbrace{\{y^3_1, y^3_6\}}^{y^4_5}$}, \
\dots
\subnode{yc-4-6}{$\overbrace{\{y^3_{104}, y^3_{105}\}}^{y^4_{5460}}$}\
\subnode{brktc4}{$ \}$}
};
\begin{scope}[decoration={markings, mark=at position 0.85 with {\arrow{>}}}]
\draw[postaction={decorate}, gray!20] (yc-3-6.south) to (yc-4-6.north);
\draw[postaction={decorate}, gray!20] (yc-3-6.south) to (yc-4-5.north);
\draw[postaction={decorate}, gray!20] (yc-3-5.south) to (yc-4-6.north);
\draw[postaction={decorate}, gray!20] (yc-3-5.south) to (yc-4-4.north);
\draw[postaction={decorate}, gray!30] (yc-3-4.south) to (yc-4-3.north);
\draw[postaction={decorate}, gray!40] (yc-3-3.south) to (yc-4-2.north);
\draw[postaction={decorate}, gray!70] (yc-3-2.south) to (yc-4-1.north);
\draw[postaction={decorate}] (yc-3-1.south) to (yc-4-4.north);
\draw[postaction={decorate}] (yc-3-1.south) to (yc-4-5.north);
\draw[postaction={decorate}] (yc-3-1.south) to (yc-4-3.north);
\draw[postaction={decorate}] (yc-3-1.south) to (yc-4-2.north);
\draw[postaction={decorate}] (yc-3-1.south) to (yc-4-1.north);
\end{scope}
\fill[draw,white,path fading=myfade] (0,-3) rectangle (\linewidth,-11);
\end{tikzpicture}
\end{document}