如何在 tikzpicture 中的一组节点下方绘制带有文本的大方括号?更具体地说,我目前有以下代码/输出:
\begin{figure}[hbt]
\centering
\tikzstyle{mynode} = [circle, fill=black, inner sep=0pt, minimum size=0.1cm, text centered]
\begin{tikzpicture}
[node distance=1.2cm]
\node (1) [mynode] {};
\node (2) [mynode, right of=1] {};
\node (3) [mynode, right of=2] {};
\node (4) [mynode, right of=3] {};
\node (5) [mynode, right of=4] {};
\end{tikzpicture}
\label{fig:network}
\end{figure}
其结果为:
我想要实现如下目标:
答案1
\documentclass[tikz,border=5mm]{standalone}
\begin{document}
\begin{tikzpicture}[line width=.8mm]
\def\a{.4}
\foreach \i in {0,1,2,3,4}
\fill (\i,0) circle(2pt);
\draw[yshift=-3 mm] (0,0)--++(-90:\a)
--++(0:2) node[midway,above]{some text}--++(90:\a);
\draw[yshift=-3 mm] (1,-\a-.2)--++(-90:\a)
--++(0:2) node[midway,above]{some text}--++(90:\a);
\draw[yshift=-3 mm] (2,-2*\a-.4)--++(-90:\a)
--++(0:2) node[midway,above]{some text}--++(90:\a);
\end{tikzpicture}
\end{document}