
答案1
該dash expand off
選項可能對您有用。
來自 TikZ 和 PGF手動的:
/tikz/dash expand off
使
off
虛線圖案的一部分可擴展,以便拉伸。僅當存在單一on
欄位off
並且需要decorations
庫時,這才有效。現在,必須在破折號圖案選項之後在應該生效的路徑上指定此選項,因為必須dash pattern
在套用它的點知道該選項。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations}
\begin{document}
\begin{tikzpicture}
\draw [dotted,dash expand off] (0,0.1) -- (1.02,0.1);
\draw [dotted,dash expand off] (0,0) -- (1,0);
\end{tikzpicture}
\end{document}