WI 编写了以下 Beamer 代码,
\documentclass{beamer}
\usetheme{Madrid}
\usepackage{tikz}
\begin{document}
\begin{frame}{C}
\begin{center}
\begin{tikzpicture}
\draw[brown] (-2,0.4) -- (2,0.4);
\draw[-] (-4.5,0)--(4.5,0);
\foreach \x/\name in {-4/$t_{1}$,-3/$t_{2}$,3/$t_{K-1}$,4/$t_{K}$}{
\path[draw, fill=brown] (\x,0) circle[radius=2pt] node [above=2 mm, brown] {\name};
}
\end{tikzpicture}
\end{center}
\end{frame}
\end{document}
有没有办法将棕线(黑线上方)转换成点网格?
答案1
您可以添加“点”来绘制\draw[brown, dotted] (-2,0.4) -- (2,0.4);