2

How would I go about drawing something that looks like this (please excuse the extremely lousy Paint image)

enter image description here

I am sorry I cannot provide any exact code, but I am basically clueless as to how I'd do this. I hope you have understanding. Thanks in advance.

cfr
  • 198,882
  • 3
    Welcome! What have you tried? Please post the code you've got. If you don't know where to start, look at the tutorials at the beginning of the TikZ manual. All you really need here are some \node (<name>) [circle] {<text>};s and then the fit library for the bigger circles, so you can fit them around the smaller ones. If you do that, somebody can help with the arrows. Please take a bit more care when tagging: this is not a tree, so I would not recommend forest; it is not engine-specific, so shouldn't be tagged pdftex. – cfr Nov 28 '23 at 20:38
  • Hello... I have only the circle of coalition 1 and 2 but don't have the legend, but wont the legend. My question is how i make the coalition 3 and 4 Thanks very much for your help – José P. Costa Nov 28 '23 at 22:52
  • As I say, post the code you have. If you've got 1 and 2 already, you can just make 3 and 4 in the same way to start with. Even if there's no intersection. You're much more likely to get help if you post some code and your question is quite likely to get closed if you don't. (There are already 2 votes to close it because people are too trigger happy. It can be reopened if you post the code later, but it is annoying people don't wait to see if people improve their questions first.) – cfr Nov 29 '23 at 00:10
  • 1
    Please don't vote to close the questions of new users before they've had a chance to respond to comments by editing them! – cfr Nov 29 '23 at 00:11
  • If you serach here for "Venn diagram" you will find many examples (see https://tex.stackexchange.com/questions/26096/tikz-labelling-venn-diagram?r=SearchResults&s=3%7C95.8673) – John Kormylo Nov 29 '23 at 14:52

1 Answers1

1

Something to point the OP in the right direction

\RequirePackage[dvipsnames]{xcolor}

\documentclass[tikz]{standalone} \usetikzlibrary{automata,positioning,fit,backgrounds} \tikzset{ back/.style={circle, inner sep=0.2cm, rounded corners=3mm}, }

\begin{document} \begin{tikzpicture}[ circ/.style={shape=circle, minimum size=1cm, draw, fill=white, outer sep=+0pt}, back/.style={circle, inner sep=0.2cm, rounded corners=3mm} ] \draw node[circ] (A1) at (0,0) {A1} node[circ] (A2) at (2,2) {A2} node[circ] (A3) at (3,4) {A3} node[circ] (A4) at (2,5) {A4}; \begin{pgfonlayer}{background} \node [back, fill=black!10, fit=(A1) (A2), label={[xshift=-2mm]above left:{\tiny black circle}}] {}; \node [back, fill=red!10, fit=(A2) (A3) (A4), label={[xshift=-2mm]above right:{\tiny red circle}}] {}; \end{pgfonlayer}

\end{tikzpicture}

\end{document}

enter image description here

js bibra
  • 21,280
  • Hello, I copied your code and made some changes, I just put the white background and the black line...

    But I wanted the continuation of the line to appear at the intersection. Can you help me ?

    – José P. Costa Nov 29 '23 at 22:04