Binned Rectangles
A simple example of a binned rectangle plot showing the distribution of Olympian weights. Based on an example from Observable Plot.
<Plot
opacity={{
range: [ds.isDark ? 0 : 0.4, 1],
type: 'sqrt'
}}
color={{ scheme: ds.isDark ? 'magma' : 'rdpu' }}>
<Rect
{...bin(
{ data: olympians, x: 'weight', y: 'height' },
{ fill: 'count', opacity: 'count' }
)}
inset={0} />
</Plot>