venn-diag-1#

../_images/sphx_glr_venn-diag-1.svg
\documentclass[]{standalone}
 
\usepackage[]{graphicx}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\tikzset{>=latex}
\usetikzlibrary{arrows,arrows.meta}
\usepackage{steinmetz}
\newcommand*{\equal}{=}
\usepackage{subcaption}

\usepackage{tikz-3dplot}
\usetikzlibrary{decorations.markings}

\tikzset{->-/.style={decoration={
  markings,
  mark=at position #1 with {\arrow{>}}},postaction={decorate}}}

\begin{document}

\def\firstcircle{(0,0) circle (1cm)}
\def\secondcircle{(0:1.5cm) circle (1cm)}

\begin{tikzpicture}
    \filldraw[blue!50,fill=blue!20,thick,text=black] \firstcircle node {$A$}  \secondcircle node {$B$}  (0.75,1.2) node {$A\cup B$};    
\end{tikzpicture}

\hspace{1cm}

\begin{tikzpicture}
    \begin{scope}
        \clip \firstcircle;
        \fill[blue!20] \secondcircle;
    \end{scope}
    \draw[blue!50,thick,text=black] \firstcircle node {$A$};
    \draw[blue!50,thick,text=black] \secondcircle node {$B$}  (0.75, 1.2)  node {$A\cap B$};
\end{tikzpicture}

\hspace{1cm}

\begin{tikzpicture}
\scope
  \clip (-1,-1) rectangle (1,1)  \secondcircle;
  \fill[blue!20,thick,text=black,thick] \firstcircle;
\endscope
\scope
\clip (-1,-1) rectangle (3,1)  \firstcircle;
\fill[blue!20,thick,text=black,thick] \secondcircle;
\endscope

\draw[blue!50,thick,text=black,thick] \firstcircle node[] {$A$};
\draw[blue!50,thick,text=black,thick] \secondcircle node[] {$B$};
\draw[] (0.75, 1.2) node {$A\triangle B$};
\end{tikzpicture}


\end{document}