0

I am trying to draw something like this in latex.

enter image description here

This is what i manage to do

\begin{tikzpicture}[line/.style={-},thick]
        \node (a) at (1,1) {1};
        \node (b) at (2,1) {2};
        \node (c) at (3,1) {3};
        \node (d) at  (4,1) {4};
        \node (e) at (5,1) {5};
        \node (f) at (6,1) {6};
        \node (g) at (7,1) {7};
        \node (h) at (8,1) {8};
        \path [bend left, line] (a) edge (c);
        \path [bend left,line]   (c) edge (h); 
        \path [bend left,line]   (e) edge (h); 
        \end{tikzpicture}

But the output looks like this:

enter image description here

That is not excatly what I am looking for. How can I improve my picture?

1 Answer 1

2

Is it better?

connecting nodes

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

\begin{document}
    \begin{tikzpicture}
        \foreach \i in {1,...,8}
            \coordinate[circle,inner sep=0pt,fill=black,minimum size=2pt,label=below:{\i}] (\i) at (\i,0) {};
        
        \foreach \A/\B in {1/3,3/8,5/7}
            \draw (\A) to[bend left=70] (\B);
    \end{tikzpicture}
\end{document}
2
  • 2
    you could also try \draw (\A) to[bend left=70, looseness=1.4] (\B); for more eccentricity
    – js bibra
    Commented Mar 21, 2021 at 12:52
  • +1 Thanks to let this here so the OP could play with the options ;)
    – SebGlav
    Commented Mar 21, 2021 at 13:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .