[Tex/LaTex] Use the tikz package to plot two overlapping, semi-transparent circles with labels

plottikz-pgf

I need to produce something similar to this with latex enter image description here

I am not familiar at all with the tikz package. However I was able to find a code that I think could be adapted to fit with my needs:

\begin{tikzpicture}[scale=0.75][thick]
   \draw (0,0) circle (2cm);
   \draw (3,-1) circle (2.5cm);
   \draw (0,0) node {A};
   \draw (3.2,-1) node {B};
   \draw [clip](0,0) circle (2cm);
   \fill[yellow] (3,-1) circle (2.5cm);
\end{tikzpicture}

It produces this figure:
enter image description here

Does anybody have an idea of how I could adapt the above code to get what I want?

Thanks for your help.

Best Answer

No need to clip; you can use fill opacity. Start with:

\documentclass[margin=10pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[
    thick]
    \draw [fill=cyan, fill opacity=0.5] (0,0) circle (2cm);
    \draw [fill=orange, fill opacity=0.5] (3,-1) circle (2.5cm);
\end{tikzpicture}
\end{document}

composing opacities

and the rest of the thing is a bit of geometry and maybe the intersections library:

\documentclass[margin=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning,calc,intersections}
\begin{document}
\begin{tikzpicture}[
    thick]
    \draw [fill=cyan, fill opacity=0.5, name path=c1] (0,0) circle (2cm);
    \draw [fill=orange, fill opacity=0.5, name path=c2] (3,-1) circle (2.5cm);
    \draw (0,0) ++(120:2cm) -- ++(120:2.2cm) node [fill=white,inner sep=5pt](a){a};
    \draw (3, -1) ++(30:2.5cm) -- ++(30:2.6cm) node [fill=white,inner sep=5pt](b){b};
    \path [name intersections={of=c1 and c2,by=cs}];
    \draw (cs) -- ++(.5,1) node [fill=white,inner sep=5pt](c){c};
\end{tikzpicture}
\end{document}

with labels

...I leave the rectangles in the legend as an exercise.