I'd like to draw something like this:

enter image description here

With two sides labeled, and the ability to label all four vertices, using TiKZ. How can this be done?

  • 2
    You \draw[->](0,0)--node[auto]{$v_{ab}$}(2,3); to draw an arrow with a label.
    – Symbol 1
    Dec 9, 2020 at 3:05

1 Answer 1

\begin{tikzpicture}[dot/.style = {circle, fill, minimum size=3pt, inner sep=0pt,
    label={[blue,font=\sffamily]above right:#1},alias=#1}]
  \path foreach \X/\Y in {120/A,60/B,0/C}{(\X:4) node[dot=\Y]{}}
  (0,0) coordinate (O)
  foreach \X/\Y/\Z in {blue/A/bd,red/B/bd,green!70!black/C/ad}
  { (O) edge[\X,-latex,edge label={$v_{\Z}$}] (\Y)}
  (B) edge[dashed] (A)  edge[dashed] (C);

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.