With minimal tikz knowledge, I try to create a node like shape, which
has two filled circles in it.
Here is my attempt, which suffers from these problems:
- The appended path components seem to be covered by the main node.
- Options passed to later path components are ignored.
MWE:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,positioning,shapes.multipart}
\begin{document}
\tikzset{cell/.style={
name=#1,
draw,
rectangle split,
rectangle split parts=3,
rectangle split horizontal=true,
append after command={%
coordinate (#1 one) at ($ (#1.east)!1/6!(#1.west) $)
coordinate (#1 two) at ($ (#1.east)!5/6!(#1.west) $)
[fill=red] (#1 one) circle (2pt)
[fill=red] (#1 two) circle (2pt)
},
}}
\begin{tikzpicture}
\node[cell=a,label=left:{missing circles}] at (0,-1) {};
\node[cell=b,above=1ex of a,label=left:{circles show, but not red}] {} [draw];
\node[cell=c, above=1ex of b,label=left:{circle ignore style options}] {} [fill=green];
\node[cell=d, above=1ex of c,label=left:{node hides circles},fill=blue!20] {} [fill=green];
\end{tikzpicture}
\end{document}
