# Diagrams for Point Set Topology

I am not able to find a Latex Library for drawing diagrams of Point-Set Topologies. See the image below. Ideally I would like to add points not along the same line as all the examples are i.e. to have a, b, and c in a non co-linear plane. But I'll take what I can get! Anyone know of the library (if there is one) that was used to generate these diagrams?

Thanks.

• Why do you think they were drawn with LaTeX? Do you mean a package rather than a library? Or do you mean, say, a TikkZ library?
– cfr
Commented Mar 13, 2017 at 3:20
• I think this could be done very easily with tikz, see, for a starting point, this post: tex.stackexchange.com/q/9681/101651. Commented Mar 13, 2017 at 3:21
• @cfr, I don't necessarily think those images were drawn with LaTex, I would just like to know how I might go about drawing them in LaTex . Commented Mar 13, 2017 at 17:01
• @CarLaTex, thanks for the link, indeed I have some Venn's in my work that link will be quite helpful though, thanks. I am hoping to find something more tailored to drawing points with elongated circles or ovals around the sets of points and possibly even be able to do things such as that in the bottom right picture in which the oval is non-convex. Commented Mar 13, 2017 at 17:04
• It would be better if you add a MWE. However, I'll post an answer soon... Commented Mar 13, 2017 at 17:07

I hope this is what you need:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{fit,shapes.geometric}
\tikzset{%
mydot/.style={draw, circle, fill=black},
myset/.style={draw, ellipse, very thick},
}

\begin{document}
\noindent
%\vspace{30ex}
\begin{center}
\begin{tikzpicture}%[]
\path (-6,-5.5) rectangle (6,5.5); % only to compensate the transform canvas
\matrix[column sep=4em,row sep=2ex,transform canvas={scale=0.5}] {% first row
\node[mydot,label=below:a] (a) {};
\node[mydot,label=below:b] (b) [below right=1cm and 1cm of a]{};
\node[mydot,label=below:c] (c) [above right = 1cm and 2cm of a]{};
\node[myset, fit=(a)(b)(c), minimum width=5.5cm] {};
&
\node[mydot,label={[label distance=.3cm]270:a}] (a) {};
\node[mydot,label=below:b] (b) [below right=1cm and 1cm of a]{};
\node[mydot,label=below:c] (c) [above right = 1cm and 2cm of a]{};
\node[myset, fit=(a)] {};
\node[myset, fit=(a)(b), minimum height=4cm, rotate=45] (ab) {};
\node[myset, fit=(ab)(c), minimum height=6cm, minimum width=5.5cm, rotate=45] {};
&
\node[mydot,label=below:a] (a) {};
\node[mydot,label={[label distance=.3cm]270:b}] (b) [below right=1cm and 1cm of a] {};
\node[mydot,label=below:c] (c) [above right = 1cm and 2cm of a]{};
\node[myset, fit=(b)] {};
\node[myset, fit=(a)(b),  minimum height=5cm, minimum width=3.5cm, rotate=45] {};
\node[myset, fit=(b)(c),  minimum height=5cm, minimum width=2.3cm, rotate=-20] {};
\node[myset,fit=(a)(b)(c), minimum height=6.5cm, minimum width=7cm, rotate=320] {};
\\ % second row
\node[mydot] (a) {};
\node[mydot] (b) [below right=1cm and 1cm of a]{};
\node[mydot] (c) [above right = 1cm and 2cm of a]{};
\node[myset, fit=(b)] {};
\node[myset, fit=(a)(b)(c),  minimum width=5.5cm] {};
&
\node[mydot] (a) {};
\node[mydot] (b) [below right=1cm and 1cm of a]{};
\node[mydot] (c) [above right = 1cm and 2cm of a]{};
\node[myset, fit=(a)] {};
\node[myset, fit=(b)(c), minimum height=4.5cm, rotate=-20] {};
\node[myset, fit=(a)(b)(c), minimum height=6cm,  minimum width=5cm, rotate=-30] {};
&
\node[mydot] (a) {};
\node[mydot] (b) [below right=1cm and 1cm of a] {};
\node[mydot] (c) [above right = 1cm and 2cm of a]{};
\node[myset, fit=(b)] {};
\node[myset, fit=(c)] {};
\node[myset, fit=(a)(b), minimum height=4cm, rotate=30] (ab) {};
\node[myset, fit=(b)(c), rotate=-20] (bc) {};
\node[myset, fit=(ab)(bc)] {};
\\ % third row
\node[mydot] (a) {};
\node[mydot] (b) [below right=1cm and 1cm of a]{};
\node[mydot] (c) [above right = 1cm and 2cm of a]{};
\node[myset, fit=(a)(b), minimum height=3cm,  minimum width=2cm, rotate=30] (ab) {};
\node[myset, fit=(ab)(c), minimum height=5.5cm,  minimum width=4.5cm, rotate=-30] {};
&
\node[mydot] (a) {};
\node[mydot] (b) [below right=1cm and 1cm of a]{};
\node[mydot] (c) [above right = 1cm and 2cm of a]{};
\node[myset, fit=(a)] {};
\node[myset, fit=(b)] {};
\node[myset, fit=(a)(b), minimum height=3cm,  minimum width=2cm, rotate=30] (ab) {};
\node[myset, fit=(ab)(c), minimum height=5.5cm,  minimum width=4.5cm, rotate=-30] {};
&
\node[mydot] (a) {};
\node[mydot] (b) [below right=1cm and 1cm of a]{};
\node[mydot] (c) [above right = 1cm and 2cm of a]{};
\node[myset, fit=(a)] {};
\node[myset, fit=(b)] {};
\node[myset, fit=(c)] {};
\node[myset, fit=(a)(b), minimum height=3cm,  minimum width=2cm, rotate=30] (ab) {};
\node[myset, fit=(b)(c), minimum height=4cm, rotate=-20] {};
\node[myset, fit=(a)(c), minimum width=4cm, rotate=30] (ac) {};
\node[myset, fit=(ab)(bc)(ac)] {};
\\
};
\end{tikzpicture}
\end{center}
\end{document}


• Amazing CarLaTeX! I don't doubt that this will actually benefit many as it seems that these diagrams are absolutely necessary, especially for visualizing Topology - though Tex diagrams were nowhere to be found! Commented Mar 26, 2017 at 20:29