Reputation: 103
I have the following code. I am trying to reduce the size of the side labels to match the labels inside the node (I do not want to increase the size of the inner labels). Please let me know if you have any ideas. Thanks
\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}
Upvotes: 2
Views: 10361
Reputation: 103
This code worked.
\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}
Upvotes: 1