Уменьшение размера меток узлов в латексе - PullRequest
0 голосов
/ 21 мая 2018

У меня есть следующий код.Я пытаюсь уменьшить размер боковых меток, чтобы они соответствовали меткам внутри узла (я не хочу увеличивать размер внутренних меток).Пожалуйста, дайте мне знать, если у вас есть идеи.Спасибо

\begin{tikzpicture}
[
    > = stealth, % arrow head style
    shorten > = 1pt, % don't touch arrow head to node
    auto,
    node distance = 2cm, % distance between nodes
    thick, dashed pattern=on % line style
    ]
    \tikzset{every state}=[
    draw = black,
    thick,
    fill = white,
    minimum size = 1mm
    ]


    \node[shape=circle,draw=black, label=right:$2$,scale=0.75] (4) at (0,0) {4};
    \node[shape=circle,draw=black, label=right:$5.75$, scale=0.75] (3) at (3,0.75) {3};
    \node[shape=circle,draw=black, label=right:$4.25$,scale=0.75] (2) at (2,4) {2};
    \node[shape=circle,draw=black, label=above:$7.75$,scale=0.75] (1) at (0,4) {1};

    \path [->] (1) edge node[left] {} (2);
    \path [->](2) edge node[left] {} (1);
    \path [->,draw, dotted, color=red](1) edge node[left] {} (4);
    \path [->,draw, dotted, color=red](4) edge node[left] {} (2);
    \path [->,draw, dotted, color=red](2) edge node[right] {} (3);
    \path [->,draw, dotted, color=red](3) edge node[left] {} (1);

\end{tikzpicture}

This is what I get

1 Ответ

0 голосов
/ 25 мая 2018

Этот код работал.

  \begin{tikzpicture}
[
    > = stealth, % arrow head style
    shorten > = 1pt, % don't touch arrow head to node
    auto,
    node distance = 2cm, % distance between nodes
    thick, dashed pattern=on % line style
    ]

    \tikzset{every state}=[
    draw = black,
    thick,
    fill = white,
    minimum size = 1mm
    ]
\node[shape=circle,draw=black,label=right:$2$] (4) at (0,0) {4};
    \node[shape=circle,draw=black, label=right:$5.75$] (3) at (4.5,1.125) {3};
    \node[shape=circle,draw=black, label=right:$4.25$] (2) at (3,6) {2};
    \node[shape=circle,draw=black, label=above:$7.75$] (1) at (0,6) {1};


  \path [->] (1) edge node[left] {} (2);
    \path [->](2) edge node[left] {} (1);
    \path [->,draw, dotted, color=red](1) edge node[left] {} (4);
    \path [->,draw, dotted, color=red](4) edge node[left] {} (2);
    \path [->,draw, dotted, color=red](2) edge node[right] {} (3);
    \path [->,draw, dotted, color=red](3) edge node[left] {} (1);
\end{tikzpicture}
...