如何减小包含 A 交点 B 的线的粗细?这是我的代码:
\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}
答案1
\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}
\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}
答案2
只是玩一下(如果您想做更复杂的图表,您必须更准确地计算角度)。
\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}
编辑
第二种方法(我不太喜欢,因为白色填充不允许在图片下方有任何东西,但无论如何这种情况不太可能发生)如下,在我看来线条看起来更好。
\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}