0

Does anyone know how to enclose and color the vertices?

% https://q.uiver.app/#q=WzAsMTAsWzcsMCwidl8yIl0sWzAsMywidl8xIl0sWzcsMywidl83Il0sWzMsNCwidl82Il0sWzExLDQsInZfOCJdLFs1LDgsInZfezEwfSJdLFs0LDExLCJ2XzUiXSxbMTAsMTEsInZfNCJdLFs5LDgsInZfOSJdLFsxNCwzLCJ2XzMiXSxbMCwxLCIiLDEseyJjb2xvdXIiOlswLDYwLDYwXSwic3R5bGUiOnsiaGVhZCI6eyJuYW1lIjoibm9uZSJ9fX1dLFswLDIsIiIsMSx7ImNvbG91ciI6WzAsNjAsNjBdLCJzdHlsZSI6eyJoZWFkIjp7Im5hbWUiOiJub25lIn19fV0sWzEsMywiIiwxLHsiY29sb3VyIjpbMCw2MCw2MF0sInN0eWxlIjp7ImhlYWQiOnsibmFtZSI6Im5vbmUifX19XSxbNSw2LCIiLDEseyJjb2xvdXIiOlswLDYwLDYwXSwic3R5bGUiOnsiaGVhZCI6eyJuYW1lIjoibm9uZSJ9fX1dLFsxLDYsIiIsMSx7ImNvbG91ciI6WzAsNjAsNjBdLCJzdHlsZSI6eyJoZWFkIjp7Im5hbWUiOiJub25lIn19fV0sWzgsNywiIiwxLHsiY29sb3VyIjpbMCw2MCw2MF0sInN0eWxlIjp7ImhlYWQiOnsibmFtZSI6Im5vbmUifX19XSxbNiw3LCIiLDEseyJjb2xvdXIiOlswLDYwLDYwXSwic3R5bGUiOnsiaGVhZCI6eyJuYW1lIjoibm9uZSJ9fX1dLFs1LDIsIiIsMSx7ImNvbG91ciI6WzAsNjAsNjBdLCJzdHlsZSI6eyJoZWFkIjp7Im5hbWUiOiJub25lIn19fV0sWzIsOCwiIiwxLHsiY29sb3VyIjpbMCw2MCw2MF0sInN0eWxlIjp7ImhlYWQiOnsibmFtZSI6Im5vbmUifX19XSxbMyw0LCIiLDEseyJjb2xvdXIiOlswLDYwLDYwXSwic3R5bGUiOnsiaGVhZCI6eyJuYW1lIjoibm9uZSJ9fX1dLFs1LDQsIiIsMSx7ImNvbG91ciI6WzAsNjAsNjBdLCJzdHlsZSI6eyJoZWFkIjp7Im5hbWUiOiJub25lIn19fV0sWzgsMywiIiwxLHsiY29sb3VyIjpbMCw2MCw2MF0sInN0eWxlIjp7ImhlYWQiOnsibmFtZSI6Im5vbmUifX19XSxbMCw5LCIiLDEseyJjb2xvdXIiOlswLDYwLDYwXSwic3R5bGUiOnsiaGVhZCI6eyJuYW1lIjoibm9uZSJ9fX1dLFs5LDQsIiIsMSx7ImNvbG91ciI6WzAsNjAsNjBdLCJzdHlsZSI6eyJoZWFkIjp7Im5hbWUiOiJub25lIn19fV0sWzksNywiIiwxLHsiY29sb3VyIjpbMCw2MCw2MF0sInN0eWxlIjp7ImhlYWQiOnsibmFtZSI6Im5vbmUifX19XV0=
\[\begin{tikzcd}[cramped,sep=tiny]
    &&&&&&& {v_2} \\
    \\
    \\
    {v_1} &&&&&&& {v_7} &&&&&&& {v_3} \\
    &&& {v_6} &&&&&&&& {v_8} \\
    \\
    \\
    \\
    &&&&& {v_{10}} &&&& {v_9} \\
    \\
    \\
    &&&& {v_5} &&&&&& {v_4}
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=1-8, to=4-1]
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=1-8, to=4-8]
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=4-1, to=5-4]
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=9-6, to=12-5]
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=4-1, to=12-5]
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=9-10, to=12-11]
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=12-5, to=12-11]
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=9-6, to=4-8]
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=4-8, to=9-10]
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=5-4, to=5-12]
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=9-6, to=5-12]
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=9-10, to=5-4]
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=1-8, to=4-15]
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=4-15, to=5-12]
    \arrow[color={rgb,255:red,214;green,92;blue,92}, no head, from=4-15, to=12-11]
\end{tikzcd}\]
Qrrbrbirlbel
  • 119,821
Tomais
  • 163

1 Answers1

2

The quiver software/website isn't really the best to get started with TikZ-CD, it's rather verbose. The library's manual is rather short and has examples.

Here's the same diagram with \arrows from inside the cells with the target specification and no unnecessary empty rows and columns.

It doesn't look good. TikZ-CD is not the best tool for this diagram.


I believe placing the nodes in a circular fashion is much better which is what I show in the other two diagrams via the graphs libraries.

The first diagram only uses subgraphs of the graphs.standard library, however it isn't easy to specify colors for individual nodes here (it will need a small bugfix) but you can do the same manual and just add things like [blue] or [draw=red] as usual.

Code

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{cd, graphs.standard}
\definecolor{Red}{RGB}{214,92,92}
\begin{document}
\[
\begin{tikzcd}[column sep=.25em, row sep=1em, arrows={dash, Red}]
 & & & &          v_2 \ar[d] \ar[dllll] \ar[drrrr] \\
                  v_1 \ar[dr] \ar[dddrr]
 & & & &          v_7 \ar[ddl]\ar[ddr]
         & & & &  v_3 \ar[dl] \ar[dddll] \\
 &       |[blue]| v_6 \ar[rrrrrr] \ar[rrrrd]
   & & & & & &    v_8 \ar[dllll] \\
 & & &            v_{10}
       & &        v_9 \\
 & & |[draw=red]| v_5 \ar[ru]\ar[rrrr]
     & & & &      v_4 \ar[lu]
\end{tikzcd}
\]
\[
\tikz\graph[
  edges=Red, simple, radius=1.5cm,
  clockwise=5, phase=90+360/5,
  typeset=$v_{\tikzgraphnodename}$]{
  subgraph K_n[V={6, ..., 10}] --
  subgraph C_n[n=5]; % n = 5 is the same as V = {1, ..., 5}
  subgraph C_n[V={6, ..., 10}, -!-]% remove the cycle, needs simple
};
\]
\[
\tikz\graph[
  edges=Red, simple, radius=1.5cm,
  clockwise=5, phase=90+360/5,
  typeset=$v_{\tikzgraphnodename}$]{
  {[clique] 6[blue], 7, 8, 9, 10} --
  {[cycle] 1, 2, 3, 4, 5[draw=red]},
  subgraph C_n[V={6, ..., 10}, -!-]% remove the cycle, needs simple
};
\]
\end{document}

Output

enter image description here

Qrrbrbirlbel
  • 119,821