- #1
Gavin Harper
- 17
- 0
Does anyone have a way to extend a current graph I have drawn with Tiks in a LaTeX document to include weights.
The code I have is this:
Thank you very much in advance!
The code I have is this:
Code:
\begin{center}
\begin{tikzpicture}
[scale=1,auto,every node/.style={circle,fill=blue!20}]
\node (v1) at (2, 4) {$ v_1 $};
\node (v2) at (0, 2) {$ v_2 $};
\node (v3) at (4, 2) {$ v_3 $};
\node (v4) at (6, 0) {$ v_4 $};
\draw (v1) -- (v2);
\draw (v1) -- (v3);
\draw (v3) -- (v4);
\end{tikzpicture}
\end{center}
Thank you very much in advance!