This message was deleted.
# help
s
This message was deleted.
r
You can use Plot.grouppZ for this, see the horizontally stacked bars example just before the Group options header (HT @Mike Bostock). If you share a notebook, I can try to help you with this.
🙌 1
z
Perhaps you want the bin transform? Here’s an example that might be more what you’re after https://observablehq.com/d/7e1183ddffd09815
💥 1
d
@Robert Kosara, @Zach Bogart thank you both so much. It had been bugging me since last night! Plot has a surprising amount of options and I need to be more patient going through the material (and maybe start before 22:00 😴 )
1
❤️ 1
🙏 1
m
This is a bit messy, but here’s an example: https://observablehq.com/d/bcd6f8acb2028b38
Copy code
Plot.plot({
  inset: 10,
  grid: true,
  color: {
    type: "ordinal",
    scheme: "cool",
    legend: true
  },
  marks: [
    Plot.dot(cars, {x: "power (hp)", y: "economy (mpg)", fill: "cylinders"}),
    Plot.hull(cars, {x: "power (hp)", y: "economy (mpg)", stroke: "cylinders"}),
    Plot.dot(cars, Plot.groupZ({x: "median", y: "median"}, {x: "power (hp)", y: "economy (mpg)", stroke: "cylinders", r: 5})),
    Plot.tip(cars, Plot.groupZ({x: "median", y: "median"}, {x: "power (hp)", y: "economy (mpg)", stroke: "cylinders"})),
  ]
})
❤️ 1
👏 4
d
Ah, nice. I haven't looked at the Delaunay marks yet. The fill option looks pretty good too. 🙂 https://observablehq.com/d/e0ea5a0df5ae3a94
d
Thanks @Mike Bostock that's great! I hadn't realised there was a hull mark and that's a great way to emphasise the groups.
❤️ 1