2

How do I decrease the thickness of the line encompassing A intersection B? This is my Code:

\documeentclass{book}
\usepackage{tikz}
\usetikzlibrary{patterns}
\begin{document}
\begin{venndiagram2sets}[tikzoptions={scale=1.7, line width = 0.2cm}, labelA= {}, labelB={}, showframe=false, shade={}]
\setpostvennhook{
\draw (labelA) node[above=0.2cm, left=1.1cm]{\LARGE $A$};
\draw (labelB) node[above=0.2cm, right=1.1cm]{\LARGE $B$};}
\begin{scope}[pattern= horizontal lines]
\fillACapB
\end{scope}
\begin{scope}[pattern= north east lines]
\fillACapB
\end{scope}
\end{venndiagram2sets}
\end{document}

I want it to be something like this: enter image description here

3

2 Answers 2

5
\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}
\draw[line width=8pt] (0,0) circle[radius=2cm] (3,0) circle[radius=2cm];
\filldraw[fill=white] (0,0) circle[radius=2cm] (3,0) circle[radius=2cm];
\clip (0,0) circle[radius=2cm];
\fill[pattern=crosshatch] (3,0) circle[radius=2cm];
\end{tikzpicture}
\end{document}

Two circles and area between them

\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}
\draw[line width=8pt] (0,0) circle[radius=2cm] (3,0) circle[radius=2cm] (60:3) circle[radius=2cm];
\filldraw[fill=white] (0,0) circle[radius=2cm] (3,0) circle[radius=2cm] (60:3) circle[radius=2cm];
\clip (0,0) circle[radius=2cm];
\clip (60:3) circle[radius=2cm];
\fill[pattern=crosshatch] (3,0) circle[radius=2cm];
\end{tikzpicture}
\end{document}

Three circles and their intersections

3
  • Please can you also help me with the one of three sets A, B and C shaded in A intersection B intersection C. Please. Thank you so much for this. Jun 21 at 11:45
  • See edit. You should normally start a new question for addition questions. -remember there is no limit on how many new question you can ask, and if you show some effort, all question will attract helpfull people. Jun 21 at 11:56
  • Thank you. I will note that. Jun 21 at 12:15
2

Just to play a bit (if you want to do more complex diagrams, you'll have to calculate the angles more accurately).

A cap B thinner

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{intersections}

\begin{document}
    \begin{tikzpicture}
        \path[name path=circleA] (0,0) circle [radius=3];
        \path[name path=circleB] (4,0) circle [radius=3];
        \path[name intersections={of=circleA and circleB}] ;
        \draw[red,fill=orange] (intersection-1) arc(132:228:3) arc(-48:48:3);
        \draw[red,line width=3pt] (intersection-1) arc(48:312:3) arc(-132:132:3) -- cycle; 
    \end{tikzpicture}
\end{document}

EDIT

A second approach (which I don't really like because of the white fill which doesn't allow to have something under the picture, but anyway it's quite unlikely) is the following where the lines seem better to my eyes.

V2

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{intersections}

\begin{document}
    \begin{tikzpicture}
        \path[name path=circleA] (0,0) circle [radius=3];
        \path[name path=circleB] (4,0) circle [radius=3];
        \path[name intersections={of=circleA and circleB}] ;
        
        \draw[red,line width=15pt] (intersection-1) arc(48:312:3) arc(-132:132:3) -- cycle; 
        \fill[white] (intersection-1) arc(48:312:3) arc(-132:132:3) -- cycle; 
        \draw[red,fill=orange] (intersection-1) arc(132:228:3) arc(-48:48:3);
    \end{tikzpicture}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.