Tikz, Problem beim Anwenden von Stilen auf Knoten

Tikz, Problem beim Anwenden von Stilen auf Knoten

Ich bin ein Anfänger in LaTeX, insbesondere in TikZ-Paket.

Ich möchte mit einigen Stilen ein Peterson-Diagramm zeichnen.

Mein Code

\documentclass{article}

\usepackage{tikz}
\usepackage{caption}
\usepackage{graphicx}

\usetikzlibrary{graphs}
\usetikzlibrary{graphs.standard}
\usetikzlibrary[graphs]

\tikzset{   
    every node/.style={draw, circle, very thick},
    mark/.style={fill=black!50, circle},    
}

\begin{document}
    \begin{figure}
        \begin{tikzpicture}[]
            \graph [simple, edges={thick}, clockwise] {
                subgraph C_n [n=5, name=A, radius=2cm]; 
                subgraph I_n [V={a,b,c,d,e}, name=B, radius=1cm];           

                (A 5)[mark] --[red] (A 4)[mark],
                A 1 -- B a,
                A 2 -- B b,
                A 3 -- B c,
                A 4 -- B d,
                A 5 -- B e,
                B a -- B c,
                B a -- B d,
                B b -- B e,
                B b -- B d,
                B e -- B c
            };

        \end{tikzpicture}
    \end{figure}    
\end{document}

Ich gehe davon aus, dass die Knoten 4 und 5 grau sind, aber ich habe nur einen roten Rand.

Bildbeschreibung hier eingeben

Was habe ich falsch gemacht?

Antwort1

Ich bin dem Link von @Kpym in seinem Kommentar gefolgt und habe dieLösung von hftf.

\documentclass[tikz,border=5mm]{standalone}

%\usepackage{tikz}
%\usepackage{caption}
\usepackage{graphicx}

\usetikzlibrary{graphs}
\usetikzlibrary{graphs.standard}


\tikzset{   
    every node/.style={draw, circle, very thick},
    marko/.style={fill=cyan!50, circle},    
}

\begin{document}
 %   \begin{figure}
        \begin{tikzpicture}[]
            \graph [simple, edges={thick},n=5,radius=2cm, clockwise] {
            1;2;3;4[marko];5[marko];
                subgraph C_n [n=5, name=A, radius=2cm]; 
                subgraph I_n [V={a,b,c,d,e}, name=B, radius=1cm];           

                (A 5) --[blue] (A 4),
                A 1 -- B a,
                A 2 -- B b,
                A 3 -- B c,
                A 4 -- B d,
                A 5 -- B e,
                B a -- B c,
                B a -- B d,
                B b -- B e,
                B b -- B d,
                B e -- B c
            };

        \end{tikzpicture}
%        
%        \tikz
%\graph [nodes={draw, circle}, n=5, radius=1.5cm, clockwise]
%{ 1; 2; 3[fill=gray]; 4; 5; subgraph K_n };
  %  \end{figure}    
\end{document}

Bildschirmfoto

verwandte Informationen