Latex 技巧_3:在邊上畫label

如何在一條邊上寫label。

\begin{figure}[h] 
		\centering
	
			\begin{tikzpicture}[scale=.5]
			\tikzstyle{state}=[filled vertex]
			\node[state] (a) at (1,1.7) {};
			\node[state] (b) at (0,0) {};
			
			
			
			\draw[thick,violet] (a)--(b);
			
			\node at (0.26,1) {$x$};
		
        
			\end{tikzpicture}
		
		
		\caption{How to write a label on an edge. }
		\label{fig:st-component}
	\end{figure}

在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章