I would like to draw a line around given subsets of nodes in Tikz. I have five nodes in total, and two overlapping subsets (red and black) of three nodes sharing one node (cf the attached picture). The issue is that the double lines have a white interior, therefore the red line hides the black one at the overlapping node.
\documentclass[12pt]{article}
\usepackage{tikz}
\begin{document}
\begin{figure}[!htbp]
\centering
\begin{tikzpicture}[scale=4,
vertex/.style={draw,circle,minimum size=0.75cm,inner sep=0pt},
arc/.style={draw=blue!50,thick,->},
arc label/.style={fill=white,font=\tiny,inner sep=1pt},
loop arc/.style={min distance=2mm}
]
% Subset 1
\draw[double=none, double distance=60pt, line join=round, line cap=round, draw=black] (1,0)--(0.3090,0.9511)--(-0.8090,0.5878);
% Subset 2
\draw[double=none, double distance=60pt, line join=round, line cap=round, draw=red] (-0.8090,0.5878)--(-0.8090,-0.5878)--(0.3090,-0.9511);
\end{tikzpicture}
\end{figure}
\end{document}
I thought that the option double=none
would solve the issue, but it seems that I am missing something, any ideas?
Thank you in advance for your help.
Best Answer
By playing around with transparency group one can create the desired effect: