0

@Qrrbrbirlbel, thank you very much for the response to this link:How do I enclose and color vertices?, how do I make the yellow circle see its label?

I send you my latex code :

%https://q.uiver.app/#q=WzAsNixbNCwxXSxbMywxLCJ2XzQiXSxbMywzLCJ2XzUiXSxbMCw0LCJ2XzMiXSxbMCwyLCJ2XzIiXSxbMCwwLCJ2XzEiXSxbNSwxLCIiLDAseyJjb2xvdXIiOlswLDYwLDYwXSwic3R5bGUiOnsiaGVhZCI6eyJuYW1lIjoibm9uZSJ9fX1dLFszLDEsIiIsMix7ImNvbG91ciI6WzAsNjAsNjBdLCJzdHlsZSI6eyJoZWFkIjp7Im5hbWUiOiJub25lIn19fV0sWzQsMiwiIiwwLHsiY29sb3VyIjpbMCw2MCw2MF0sInN0eWxlIjp7ImhlYWQiOnsibmFtZSI6Im5vbmUifX19XSxbNSwyLCIiLDIseyJjb2xvdXIiOlswLDYwLDYwXSwic3R5bGUiOnsiaGVhZCI6eyJuYW1lIjoibm9uZSJ9fX1dXQ==
\[\begin{tikzcd}[cramped] 
    |[blue] [draw=blue, circle]| {v_1} \\
    &&&  {v_4} & {} \\
|[blue]     [draw=blue, circle]| {v_2} \\
    &&& {v_5} \\
|[red] [fill, yellow] [draw=blue, circle]|  {v_3}
    \arrow[draw={rgb,255:red,214;green,92;blue,92}, no head, from=1-1, to=2-4]
    \arrow[draw={rgb,255:red,214;green,92;blue,92}, no head, from=5-1, to=2-4]
    \arrow[draw={rgb,255:red,214;green,92;blue,92}, no head, from=3-1, to=4-4]
    \arrow[draw={rgb,255:red,214;green,92;blue,92}, no head, from=1-1, to=4-4]
\end{tikzcd}\]
Tomais
  • 163

1 Answers1

1

Code line

|[red] [fill, yellow] [draw=blue, circle]|  {v_3}

is not correct. It should be

|[red] [circle, draw=blue, fill=yellow]|  {v_3} % <---

Complete MWE than is:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{cd, graphs.standard}
\definecolor{Red}{RGB}{214,92,92}

\begin{document} [ \begin{tikzcd}[cramped] |[blue] [draw=blue, circle]| {v_1} \ &&& {v_4} & {} \ |[blue] [draw=blue, circle]| {v_2} \ &&& {v_5} \ |[red] [circle, draw=blue, fill=yellow]| {v_3} % <--- \arrow[draw={rgb,255:red,214;green,92;blue,92}, no head, from=1-1, to=2-4] \arrow[draw={rgb,255:red,214;green,92;blue,92}, no head, from=5-1, to=2-4] \arrow[draw={rgb,255:red,214;green,92;blue,92}, no head, from=3-1, to=4-4] \arrow[draw={rgb,255:red,214;green,92;blue,92}, no head, from=1-1, to=4-4] \end{tikzcd} ] \end{document}

enter image description here

Addendum:
See, if the following, much shorter code for your diagram is acceptable for you:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{cd, graphs.standard}
\definecolor{Red}{RGB}{214,92,92}

\begin{document} [ \begin{tikzcd}[cramped, arrows= {Red, no head} ] |[blue, draw=blue, circle]| {v_1} \ &&& {v_4} & {} \ |[blue, draw=blue, circle]| {v_2} \ &&& {v_5} \ |[red, circle, draw=blue, fill=yellow]| {v_3} % <--- \arrow[from=1-1, to=2-4] \arrow[from=5-1, to=2-4] \arrow[from=3-1, to=4-4] \arrow[from=1-1, to=4-4] \end{tikzcd} ] \end{document}

or

%\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{cd, graphs.standard}
\definecolor{Red}{RGB}{214,92,92}

\begin{document} [ \begin{tikzcd}[cramped, arrows= {Red, no head}, cells = {nodes={circle, draw=blue, text=blue}} ] v_1 \ &&& |[draw=none]| v_4 \ v_2 \ &&& |[draw=none]| v_5 \ |[fill=yellow, text=red]| v_3 \arrow[from=1-1, to=2-4] \arrow[from=5-1, to=2-4] \arrow[from=3-1, to=4-4] \arrow[from=1-1, to=4-4] \end{tikzcd} ] \end{document}

Results are the same as before.

Zarko
  • 296,517