Observable Plot 0.6.2

We are excited to announce the release of Observable Plot 0.6.2!

The new raster mark and contour mark generate a raster image and smooth contours, respectively, from spatial samples. For example, the plot below shows a gridded digital elevation model of Maungawhau (R’s volcano dataset) with contours every 10 meters:

  color: {legend: true, label: "Height (m)"},
  marks: [
    Plot.raster(volcano.values, {width: volcano.width, height: volcano.height}),
    Plot.contour(volcano.values, {width: volcano.width, height: volcano.height, interval: 10})

The vector mark now supports the shape constant option; the built-in shapes are arrow (default) and spike. The new spike convenience constructor creates a vector suitable for spike maps. And there are new centroid transforms!

  width: 960,
  height: 600,
  projection: "albers-usa",
  length: {
    range: [0, 200]
  marks: [
    Plot.geo(nation, {fill: "#e0e0e0"}),
    Plot.geo(statemesh, {stroke: "white"}),
    Plot.spike(counties.features, Plot.geoCentroid({stroke: "red", length: (d) => population.get(d.id)}))

Also, the bin transform is now much, much faster. You can read about these improvements and quite a few more in our release notes.

If you have feedback or suggestions, please let us know here or file an issue. Thanks!