TikZ:去除圆形分割、矩形分割等的内线。

TikZ:去除圆形分割、矩形分割等的内线。

如何删除分割形状(如圆形分割或矩形分割)内的分割线。例如:

\begin{tikzpicture}
\node[draw, circle split, thick]{$1$ \nodepart{lower} $2$};
\end{tikzpicture}

给出一个带有粗分割线的粗圆圈。可以删除中间的线吗?

答案1

这个答案是 Mark Wibrow 给我的(谢谢 Mark!)。我在这里引用它以供将来参考:

如果您只是想消除该split行,然后尝试使用rectangle split draw splits key

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.multipart}
\begin{document}
\begin{tikzpicture}[every node/.style={draw, anchor=text, rectangle split,rectangle split parts=3}]
\node {text \nodepart{second} \nodepart{third}third};
\node [rectangle split ignore empty parts] at (2,0)
{text \nodepart{second} \nodepart{third}third};
\end{tikzpicture}

\begin{tikzpicture}[every node/.style={draw, anchor=text, rectangle split,rectangle split parts=3, rectangle split draw splits=false}]
\node {text \nodepart{second} \nodepart{third}third};
\node [rectangle split ignore empty parts] at (2,0)
{text \nodepart{second} \nodepart{third}third};
\end{tikzpicture}

\end{document}

相关内容