2

I want to make a visual representation of three sets namely S,A and B where A is a subset of B and B is a subset of S. It looks like this: enter image description here

Basically, one rectangle with two circles inside it. One circle (any color) is inside the other circle (different color than the other circle).

  • 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. – Stefan Pinnow Jan 21 '17 at 13:42
  • 1
    Something like http://www.ctan.org/pkg/venndiagram provides? –  Jan 21 '17 at 13:43
  • It is not a Venn diagram, it is a Euler diagram. I don't think there is a package yet (http://stackoverflow.com/questions/17031505/can-i-automatically-generate-an-euler-venn-diagram-from-a-containment-graph). Maybe this can help: http://tex.stackexchange.com/questions/208793/euler-diagram-missing-a-part – dexteritas Jan 21 '17 at 14:31

1 Answers1

5

Something like this:

\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{patterns}
\begin{document}

\begin{tikzpicture}
\draw (0,0) rectangle (8,5);  
\node [at={(1,4)}] {$S$};
\draw[pattern=north east lines] (4.5,2) ellipse[x radius = 3, 
y radius = 1.5];
\node [at={(1,1.5)}] {$B$};
\draw [fill, color=white] (5,2) ellipse [x radius =2, 
y radius = 1];
\node [at = {(5,2)}] {$A$};
\end{tikzpicture}

\end{document}

enter image description here

Boris
  • 38,129