-1

enter image description here

How to draw this figure in tikz picture. can anybody give provide me its code.

2
  • 1
    Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help.
    – dexteritas
    Oct 29, 2022 at 14:50
  • Have a look at similar questions and to create a starting point, e.g. tex.stackexchange.com/q/494487/123129
    – dexteritas
    Oct 29, 2022 at 14:52

1 Answer 1

3

try this code

\documentclass{article}
\usepackage{pgf,tikz}
\usetikzlibrary{positioning,shapes,fit,calc}

\begin{document}
\begin{tikzpicture}
\tikzset{Point/.style={draw,fill,circle=0.5mm,inner sep=0.5mm}}

\node[Point, label={[right,name={L11}]:$U_{1,1}$}](u11){};
\node[Point,below=1em of u11, label={[right,name=L12]:$U_{1,2}$}](u12){};
\node[Point,below=1em of u12, label={[right,name=L13]:$U_{1,3}$}](u13){};
\node[fit=(u11)(u12)(u13)(L11)(L12)(L13),ellipse,draw,label={$U1$}](u1){};


\node[Point, below=6em of u13,label={[right,name={L21}]:$U_{2,1}$}](u21){};
\node[Point,below=1em of u21, label={[right,name=L22]:$U_{2,2}$}](u22){};
\node[Point,below=1em of u22, label={[right,name=L23]:$U_{2,3}$}](u23){};
\node[fit=(u21)(u22)(u23)(L21)(L22)(L23),ellipse,draw,label={$U2$}](u2){};
\node[fit=(u1)(u2),draw, ellipse,label=U]{};

\begin{scope}[xshift=15em]

\node[Point, label={[right,name={L11}]:$V_{1,1}$}](v11){};
\node[Point,below=1em of v11, label={[right,name=L12]:$V_{1,2}$}](v12){};
\node[Point,below=1em of v12, label={[right,name=L13]:$V_{1,3}$}](v13){};
\node[Point,below=1em of v13, label={[right,name=L14]:$V_{1,4}$}](v14){};
\node[fit=(v11)(v12)(v13)(v14)(L11)(L12)(L13)(L14),ellipse,draw,label={$V1$}](v1){};


\node[Point, below=8em of v13,label={[right,name={L21}]:$V_{2,1}$}](v21){};
\node[Point,below=1em of v21, label={[right,name=L22]:$V_{2,2}$}](v22){};
\node[Point,below=1em of v22, label={[right,name=L23]:$V_{2,3}$}](v23){};
\node[fit=(v21)(v22)(v23)(L21)(L22)(L23),ellipse,draw,label={$V2$}](v2){};
\node[fit=(v1)(v2),draw, ellipse,label=V]{};
\end{scope}

\draw (u1) -- (v12);
\draw (u2) -- (v12);

\end{tikzpicture}
\end{document}

enter image description here

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