2

I wish draw the following graph: Figure

Follows the my attempt:

\usetikzlibrary{positioning}
\begin{tikzpicture}
\tikzset{pointblack/.style={fill=black, circle, minimum width=3pt, scale=0.6}}
%% 
\node at (2, 0.5) [pointblack] (xhw) {};
\node at (2, -0.5) [pointblack] (xwz) {};
\node at (6, 0) [pointblack] (out) {};
\node at (1,0) [pointblack] (x) {};
\node at (4, 0.5) [pointblack] (y) {};
%%% edges
\draw
(out) to [bend left = 10] (xhw)
(out) to [bend right = 25] (xhw)
(out) to (xwz);
\draw[dashed]
(y) to [bend left = 35] (x)
(y) to [bend right = 45] (x);
\end{tikzpicture}

Remain draw the dashed loop passing by edge above. How can I to do?

1
  • With a screenshot (and some indication of „above“) it would be easier. However, you probably want to look for in and out, which specify angles of outgoing and incoming lines and bends the line as needed.
    – MS-SPO
    Aug 13, 2022 at 4:14

1 Answer 1

3

Like this:

enter image description here

\documentclass[margin=3mm]{standalone}

\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}
\begin{tikzpicture}[
node distance = 7mm and 11mm,
pointblack/.style = {fill=black, circle, minimum width=2pt}
                    ]
    \begin{scope}[nodes=pointblack]
\node   (x) {};
\node[above right=of x] (xhw) {};
\node[below right=of x] (xwz) {};
\node[right=of xhw]     (y)   {};
\node[below right=of y] (out) {};
    \end{scope}
%%% edges
\draw[dashed]
    (x) to (y) (y) to [bend right = 45] (x)
    (x) to [out=-60,in=-0,distance=33mm] (x);
\draw 
    (xhw)   to  (out)  
            to [bend right = 45] (xhw)
    (out)   to (xwz);

\end{tikzpicture}
\end{document}

Addendum: in the case, that you like to have more narrow bounding box around picture, than use of the library bbox is thw way to go:

\documentclass[margin=3mm]{standalone}

\usepackage{tikz}
\usetikzlibrary{bbox,           % <---
                positioning}

\begin{document}
\begin{tikzpicture}[
node distance = 7mm and 11mm,
bezier bounding box,            % <---
pointblack/.style = {fill, circle, outer sep=0pt}
                    ]
 ...

enter image description here

You must log in to answer this question.

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