Plotting with Plot.cell()

A conceptual question:
I would like to create a calendar visualization and use Plot.cell() to have one cell per day. If I now want to have a data-driven way to plot each day not just by color but let’s say by dividing each cell into 16 subcells and use the fill of these subcell to indicate a value. How would I go about it?

  1. Create the “top-level” calendar with Plot to have a cell per day. Then use d3 to work on the resulting SVG and refine with the subcells.

  2. Is there a way to recursively define a Plot.cell()'s as part of Plot.cell() or is Plot.cell as a mark the lowest level element of Plot to build upon?

Yes, I think you will have to create your own mark. (Please share a notebook with some data if you want us to be able to iterate on it.)

1 Like

Here is a starting point with a calendar visualization. drawCalendar / ee2dev / Observable
Example 3 takes the aapl data and visualizes the “Close” column as a color of a day. The idea would be to instead take the value (let’s say a frequency of something) and subdivide the day rectangle into squares which are filled based on the value.