2

I can get the MWE working but when I insert that Tikz graph into a large document, the edges get super small -- some inheritance? How can I make the edges stay in the right size in tikz graph?

Goal and its MWE

\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{graphs}
\usetikzlibrary{graphs.standard}
\begin{document}

\tikz \graph {
1 -- 1{,}4 -- 1{,}3 -- 1{,}2 -- 1{,}4{} -- 1{};
2 -- 2{,}4 -- 2{,}3 -- 2{,}1 -- 2{,}4{} -- 2{};
3 -- 3{,}1 -- 3{,}2 -- 3{,}4 -- 3{,}5 -- 3{};
4 -- 4{,}1 -- 4{,}2 -- 4{,}3 -- 4{,}1{} -- 4{,}2{} -- 4{};
5 -- 5{} -- 5{,}3 -- 5{}{} -- 5{}{}{};

1{,}4 -- [bend right] 4{,}1;
1{,}3 -- 3{,}1;
2{,}4{} -- 4{,}2{};
1{,}4{} -- [bend right] 4{,}1{};
3{,}5 -- [bend right] 5{,}3;
2{,}4 -- 4{,}2;
};

\end{document}

enter image description here

Result where edges super small

enter image description here

  • I'm sorry, could you elaborate? I don't undestand what you mean by edges here. – Runar Jul 20 '16 at 16:09
  • @RunarTrollet edges are between the numbers: in the result, the edges become just dots because the node settings make the nodes (the numbers) become too large -- so I need to find settings by which I can change the size of the node smaller. I found a way to do it with inner sep but missing small font size on the nodes. – hhh Jul 20 '16 at 16:10
  • the MWE is supposed to be an example of the problem can't you add text in from your bigger document until you get the bad result and post the example document – David Carlisle Jul 20 '16 at 21:54
1

The inner sep settings are somehow inherited from node settings so making them to null. I updated like this and it is getting a bit better but the font size in the nodes (the numbers) is still somewhat too large.

\tikz [inner sep=0pt]\graph {
1 -- 1{,}4 -- 1{,}3 -- 1{,}2 -- 1{,}4{} -- 1{};
2 -- 2{,}4 -- 2{,}3 -- 2{,}1 -- 2{,}4{} -- 2{};
3 -- 3{,}1 -- 3{,}2 -- 3{,}4 -- 3{,}5 -- 3{};
4 -- 4{,}1 -- 4{,}2 -- 4{,}3 -- 4{,}1{} -- 4{,}2{} -- 4{};
5 -- 5{} -- 5{,}3 -- 5{}{} -- 5{}{}{};

1{,}4 -- [bend right] 4{,}1;
1{,}3 -- 3{,}1;
2{,}4{} -- 4{,}2{};
1{,}4{} -- [bend right] 4{,}1{};
3{,}5 -- [bend right] 5{,}3;
2{,}4 -- 4{,}2;
};
}
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.