Skip to content

Could Plot.auto make the Simpsons cell heatmap? #1672

Closed
@tophtucker

Description

@tophtucker

Selecting a bar override on "season" vs "number_in_season" makes a bunch of zero-width, zero-height rects (and a working tooltip with some extraneous intervals): https://observablehq.com/d/58a592d7a3c97fc8

Plot.auto(simpsons, {x: "season", y: "number_in_season", color: "imdb_rating", mark: "bar"}).plot()

I wish it made this:

Plot.cell(simpsons, {x: "season", y: "number_in_season", fill: "imdb_rating"}).plot()

If there's no reducer / no binning by which to give the rects extent, could we infer that we could treat x and y as discrete and use cell instead? Though maybe that'd be brittle; it'd kinda depend on the numbers being evenly spaced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn’t working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions