# Remove intersect line for one circle using venndiagram2sets

Problem:

I wish to remove the intersecting line for circle A (left).

Minimal Working Example (MWE):

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{backgrounds,positioning}
\usepackage{venndiagram}
\usepackage{float}
\usepackage{showframe}

\begin{document}

\begin{figure}[H]
\centering
\begin{minipage}[t]{0.45\textwidth}
\fillOnlyA
\setpostvennhook
{
\draw (labelA) node[below=6ex] {A\textbackslash B};
\draw (labelB) node[below=6ex] {B};
}
\end{venndiagram2sets}
\caption{$\mathbf{A}$\textbackslash$\mathbf{B}$}
\label{fig:venncup}
\end{minipage}
\end{figure}

\end{document}


Current output:

Desired output:

To remove the right line for the left circle - alternatively fill circle B (right) with white color to cover the line.

• Hi. Are you open in "just tikz" solutioons? I think you will find much easier an answer and it will be simple Jul 14 '19 at 14:48
• @koleygr Yes I am Jul 14 '19 at 14:48
• Perhaps you could add a white arc to circle A? Jul 14 '19 at 15:02
• @Bernard How would I do that using the venndiagram package? Jul 14 '19 at 15:03
• You'd probably have to insert some pure TikZ code. Jul 14 '19 at 15:19

The venndiagram package is very well written and hence easy to customize. I added a style interior B (and also interior A) that can be used as follows:

\fill[white,interior B];


This fills the right circle white. One could add several other similar styles, if needed.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{backgrounds,positioning}
\usepackage{venndiagram}
\usepackage{float}
\usepackage{showframe}
\makeatletter
\tikzset{interior A/.style={insert path={
interior B/.style={insert path={
\makeatother
\begin{document}

\begin{figure}[H]
\centering
\begin{minipage}[t]{0.45\textwidth}
\fillOnlyA
\setpostvennhook
{
\fill[white,interior B];
\draw (labelA) node[below=6ex] {A\textbackslash B};
\draw (labelB) node[below=6ex] {B};
}
\end{venndiagram2sets}
\caption{$\mathbf{A}$\textbackslash$\mathbf{B}$}
\label{fig:venncup}
\end{minipage}
\end{figure}

\end{document}


• in my opinion, customizing the "venndiagram" package is boring! at least "plain" TikZ is much easier to customizing Jul 15 '19 at 16:25

A solution with "plain tikz":

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{backgrounds,positioning}
\usepackage{float}
\usepackage{showframe}

\begin{document}

\begin{figure}[H]
\centering
\begin{minipage}[t]{0.45\textwidth}
\begin{tikzpicture}[scale=0.6]
\draw (-4,-3)rectangle (6,3);
\fill[gray,draw=black] (0,0)  circle (2cm);
\node at (0,0){A\textbackslash B};
\fill[white,draw=black] (3cm,0) circle  (2cm);
\node at (3cm,0) {B};
\end{tikzpicture}
\caption{$\mathbf{A}$\textbackslash$\mathbf{B}$}
\label{fig:venncup}
\end{minipage}
\end{figure}

\end{document}


• a bit simpler \begin{tikzpicture} \draw[fill=gray!50] (0,0) circle(1) node{$A{\setminus}B$}; \draw[fill=white] (1.5,0) circle(1) node{$B$}; \end{tikzpicture} Jul 15 '19 at 16:19
• @BlackMild Yes ... it is ... You just lost the rectangle. use the latex open quote of your keyboard to place (inline) code in your comments and answers like: test (inside "LaTeX opening quotes") Jul 15 '19 at 20:30