it's the color legend in the second cell of this notebook—in a future version, Plot will be able to create its own color legends (actually based on the code for swatches)
One subtlety to be wary of with this example is that z order matters: the visualization will look different depending on whether the blue rects are drawn on top of the orange rects or vice versa. You can see this by including `z: d => d.sex=='female',` in the second argument to Plot.bin.
Yes. This can be addressed with mixBlendMode: "multiply", but unfortunately that renders more slowly (in today’s browsers at least). The density mark might be a better choice for comparing overlapping two-dimensional distributions.