1

Hello I have the following code :

\usepackage{tkz-graph}
\usetikzlibrary{arrows}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,thick]
\SetGraphUnit{3} 
\tikzset{VertexStyle/.style = {draw,circle,thick,
                               minimum size=1cm,
                               font=\Large\bfseries},thick} 
\Vertex{1} \SOWE(1){2} \SOEA(1){3} \NOEA(3){L} 
\Edges(3,2,1) \Edge(3)(1) \Edge(L)(1)  \Edge(L)(3)

\Loopdist=2cm,dir=NO,label=$\phi_{1,1}$,labelstyle=above
\Loopdist=2cm,dir=SOEA,label=$\phi_{3,3}$,labelstyle=below right

\path[every node/.style={swap,auto}] (2) to node {$\phi_{2,1}$} (1) to node {$\phi_{3,1}$} (3) to node {$\phi_{2,3}$} (2) (L) to node {$\phi_{1}^L$} (1) (L) to node {$\phi_{}^L$} (3); \draw[->] (1) to [bend right] node [above left] {$\phi_{1,2}$} (2); \draw[->] (L) to [bend left=110] node [above left] {$\phi_{2}^L$} (2);

% it's possible with \Edge but Tikz's syntax is allowed too. \end{tikzpicture}

I would like to colour all edges from vertex (L) to vertex (1), (2), (3) in purple and put in bold the label above these edges and in purple as well. I really dont know how to figure it out... Thank you so much!!!

1 Answers1

0

Colouring edges purple is quite easy by just adding purple to the options. The same goes for nodes. If nodes are part of a coloured edge, they take over this colour. You cannot, however, write \path (A) to (B) to[purple] (C); to colourise just the part between (B) and (C). But you can use edge instead of to, which I applied in the example below.

To make mathematical symbols bold, you need to load the amsmath package and wrap either the macro \mathbf{} or, since this is not available for every symbol, \pmb{} around every symbol that should be bold.

Finally, I tried to beautify the large bend arrow.

\documentclass[tikz, border=2pt]{standalone}

\usepackage{tkz-graph} \usepackage{amsmath} \usetikzlibrary{arrows}

\begin{document}

\begin{tikzpicture}[->,>=stealth',shorten >=1pt,thick] \SetGraphUnit{3} \tikzset{VertexStyle/.style = {draw,circle,thick, minimum size=1cm, font=\Large\bfseries},thick} \Vertex{1} \SOWE(1){2} \SOEA(1){3} \NOEA(3){L} \Edges(3,2,1) \Edge(3)(1) \Edge(L)(1) \Edge(L)(3)

\Loopdist=2cm,dir=NO,label=$\phi_{1,1}$,labelstyle=above
\Loopdist=2cm,dir=SOEA,label=$\phi_{3,3}$,labelstyle=below right

\path[every node/.style={swap,auto}] (2) to node {$\phi_{2,1}$} (1) to node {$\phi_{3,1}$} (3) to node {$\phi_{2,3}$} (2) (L) edge[purple] node {$\pmb{\phi}{\mathbf{1}}^{\pmb{L}}$} (1) (L) edge[purple] node {$\pmb{\phi}{}^{\pmb{L}}$} (3); \draw[->] (1) edge [bend right] node [above left] {$\phi_{1,2}$} (2); \draw[->, purple] (L) edge [in=300, out=290, looseness=1.35] node [above left] {$\pmb{\phi}_{\mathbf{2}}^{\pmb{L}}$} (2);

\end{tikzpicture}

\end{document}

enter image description here

  • THANK YOU SO MUCH!!! I also wanted to ask for the arrow but thought it would be too much of asking!!! – Lola1993 Mar 25 '21 at 02:26