Skip to content

bin-z for 2D bins - #198

Merged
mbostock merged 5 commits into
mbostock/bin-zfrom
fil/bin-z
Mar 8, 2021
Merged

mbostock merged 5 commits into
mbostock/bin-zfrom
fil/bin-z

Conversation

@Fil

@Fil Fil commented Mar 8, 2021

Copy link
Copy Markdown
Contributor

example: http://localhost:8008/?test=penguinSexMassCulmenSpecies

Capture d’écran 2021-03-08 à 09 23 26

  Plot.plot({
    facet: {
      data,
      x: "sex"
    },
    inset: 10,
    marks: [
      Plot.frame(),
      Plot.dot(data, Plot.binR({
        thresholds: 10,
        x: "body_mass_g",
        y: "culmen_length_mm",
        stroke: "species",
        fill: "species",
        fillOpacity: .1
      }))
    ],
    width: 610,
    height: 300
  });

Fil added 3 commits March 8, 2021 09:21
example http://localhost:8008/?test=penguinSexMassCulmenSpecies

remove unused functions
(most useful when we want to specify them as arrays of values)
@Fil
Fil requested a review from mbostock March 8, 2021 08:49
@Fil Fil mentioned this pull request Mar 8, 2021
@mbostock

mbostock commented Mar 8, 2021

Copy link
Copy Markdown
Member

Awesome! Thanks for helping with this. I’ll look later today (a lot of meetings though).

FYI, there was already a way to specify separate properties for x and y, e.g., x: {value: “foo”, thresholds: 20}. That’s what the maybeValue helper is for. A little obscure though.

@mbostock
mbostock merged commit 5bdc4be into mbostock/bin-z Mar 8, 2021
@mbostock
mbostock deleted the fil/bin-z branch March 8, 2021 19:12
mbostock added a commit that referenced this pull request Mar 8, 2021
* z bin

* z, x1 inheritance

* stacked bin test

* use rectY

* more TODO

* x1, y1 inheritance

* bins as grouped data

* fix x inheritance

* bin1 normalize

* simplify

* reorder

* bin-z for 2D bins (#198)

* generealize z-bin1 to z-bin2
example http://localhost:8008/?test=penguinSexMassCulmenSpecies

remove unused functions

* allow separate thresholds_x and thresholds_y
(most useful when we want to specify them as arrays of values)

* a grid to match the binning

* tweaks

Co-authored-by: Mike Bostock <mbostock@gmail.com>

Co-authored-by: Philippe Rivière <fil@rezo.net>
mbostock added a commit that referenced this pull request Mar 8, 2021
* composable transform

* fix crash on const z

* remove basic transform support

* normalize transform

* remove unused import

* movingAverage transform

* propagate computed channels

* stack transform

* preserve data during select

* fix select

* simpler composite transform

* fix select, normalize

* restore stack transform

* restore movingAverage transform

* minimize diff

* revert tests

* restore group transform

* fix tests

* restore bin transform

* fix label

* shorter

* cleaner

* cleaner bin

* more flexible rect[XY]

* z bin (#196)

* z bin

* z, x1 inheritance

* stacked bin test

* use rectY

* more TODO

* x1, y1 inheritance

* bins as grouped data

* fix x inheritance

* bin1 normalize

* simplify

* reorder

* bin-z for 2D bins (#198)

* generealize z-bin1 to z-bin2
example http://localhost:8008/?test=penguinSexMassCulmenSpecies

remove unused functions

* allow separate thresholds_x and thresholds_y
(most useful when we want to specify them as arrays of values)

* a grid to match the binning

* tweaks

Co-authored-by: Mike Bostock <mbostock@gmail.com>

Co-authored-by: Philippe Rivière <fil@rezo.net>

* format

* group1 sort by x

* group2

* rename

* consolidate

* fix #201; group domain option

Co-authored-by: Philippe Rivière <fil@rezo.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants