I have the following Hasse diagram
which uses the following code:
\documentclass[a4paper, 12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{fit}
\begin{document}
\begin{figure}[h]
\centering
\begin{tikzpicture}
\node (abc) at (0,4) {$\{a,b,c\}$};
\node (ab) at (-2,2) {$\{a,b\}$};
\node (ac) at (0,2) {$\{a,c\}$};
\node (bc) at (2,2) {$\{b,c\}$};
\node (a) at (-2,0) {$\{a\}$};
\node (b) at (0,0) {$\{b\}$};
\node (c) at (2,0) {$\{c\}$};
\node (empty) at (0,-2) {$\{\}$};
\draw (abc) -- (ab) -- (a) -- (empty) -- (c) -- (bc) -- (abc) -- (ac) -- (a)
(ac) -- (c)
(b) -- (empty);
\draw[preaction={draw=white, -,line width=6pt}] (ab) -- (b) -- (bc);
\end{tikzpicture}
\label{fig:hasse}
\end{figure}
\end{document}
I am attempting to draw a box around some of the nodes like so:
\documentclass[a4paper, 12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{fit}
\begin{document}
\begin{figure}[h]
\centering
\begin{tikzpicture}
\node (abc) at (0,4) {$\{a,b,c\}$};
\node (ab) at (-2,2) {$\{a,b\}$};
\node (ac) at (0,2) {$\{a,c\}$};
\node (bc) at (2,2) {$\{b,c\}$};
\node (a) at (-2,0) {$\{a\}$};
\node (b) at (0,0) {$\{b\}$};
\node (c) at (2,0) {$\{c\}$};
\node (empty) at (0,-2) {$\{\}$};
\draw (abc) -- (ab) -- (a) -- (empty) -- (c) -- (bc) -- (abc) -- (ac) -- (a)
(ac) -- (c)
(b) -- (empty);
\draw[preaction={draw=white, -,line width=6pt}] (ab) -- (b) -- (bc);
\node[draw,dotted,fit=(ab) (a) (b)] {};
\end{tikzpicture}
\label{fig:hasse}
\end{figure}
\end{document}
which (unsurprisingly) ends up looking like this:
What I would like (ideally) is to make some round corner triangle that covers the nodes (ab), (a) and (b) such that (ac) remains uncovered. I'm quite new to tikz (though I use tikz-cd a fair amount) so I'm unsure which library would help without overly convoluting the code (several answers I've read I wouldn't be able to adapt for my purposes without explanation).
Any help appreciated, thanks!




rotate fit. However, instead of doing all this, samcarter's nice answer is the way to go. – Jan 07 '19 at 15:43