I would like to fill the space between the three curves in this MWE
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}[scale=3]
\draw[name path=A] (0,0) to[out=5, in = 185] node[pos=0,left] {A1} node[pos=1,right] {A2} (3,3);
\draw[name path=B] (2,0.5) to[out=135,in=-90] node[pos=0,below right] {B1} node[pos=1,above] {B2} (-1,4);
\draw[name path=C] (-0.5,1) to[out=90,in=135] node[pos=0,below] {C1} node[pos=1,below right] {C2} (2.5,2);
\path[name intersections={of=A and B,by=AB}];
\draw (AB) node[below=1em] {AB} circle[radius=2pt];
\path[name intersections={of=A and C,by=AC}];
\draw (AC) node[above=1em] {AC} circle[radius=2pt];
\path[name intersections={of=B and C,by=BC}];
\draw (BC) node[above=1em] {BC} circle[radius=2pt];
\end{tikzpicture}
\end{document}
In Fill the Area between two “\draw” lines, the question is similar, but there are only two draw lines, so the area can be filled all at once using fillbetween.
The technique in TikZ: Drawing an arc from an intersection to an intersection seems like it should work here, but I have not been able to make it work:
\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{intersections}
\usepgfplotslibrary{fillbetween}
\makeatletter
\tikzset{use path/.code=\tikz@addmode{\pgfsyssoftpath@setcurrentpath#1}}
\makeatother
\pgfdeclarelayer{bg}
\pgfsetlayers{bg,main}
\begin{document}
\begin{tikzpicture}[scale=3]
\draw[name path=A] (0,0) to[out=5, in = 185] node[pos=0,left] {A1} node[pos=1,right] {A2} (3,3);
\draw[name path=B] (2,0.5) to[out=135,in=-90] node[pos=0,below right] {B1} node[pos=1,above] {B2} (-1,4);
\draw[name path=C] (-0.5,1) to[out=90,in=135] node[pos=0,below] {C1} node[pos=1,below right] {C2} (2.5,2);
\path[name intersections={of=A and B,by=AB}];
\draw (AB) node[below=1em] {AB} circle[radius=2pt];
\path[name intersections={of=A and C,by=AC}];
\draw (AC) node[above=1em] {AC} circle[radius=2pt];
\path[name intersections={of=B and C,by=BC}];
\draw (BC) node[above=1em] {BC} circle[radius=2pt];
\begin{pgfonlayer}{bg}
\draw [magenta,fill=green,intersection segments={
of=A and B,
sequence={L2--R2}
},name path=ABpath];
\fill[orange,intersection segments={
of=ABpath and C,
sequence={L2--R2}
}];
\end{pgfonlayer}
\end{tikzpicture}
\end{document}
In this second MWE, ABpath is intended to follow curve A from A2 to AB and then curve B from AB to B2, but the straight magenta line from A2 to AB suggests that it does not. I think I should be able to use an intersection of ABpath and C to define the boundaries of the area to be filled, but the orange fill illustrates that I haven't gotten it right.





insert pathkey is described on p. 151 of pgf manual v3.1.4. Yes, in this case I did just quickly define something that does what I want without the need to repeat things. If we are very lucky, some competent users decide to work on this issue, so that path recycling becomes more convenient and structured. – Nov 17 '19 at 00:19by=AB}and then later the path withname path=AB, does the latter simply overwrite the former without warning? Thanks. – PatrickT Dec 08 '21 at 10:38