Skip to main content

hexbin

2
import { hexbin } from "@sportsdataverse/sdvplot/bins";

const shots = [
{ x_legacy: 0, y_legacy: 0 },
{ x_legacy: -1, y_legacy: 7 },
{ x_legacy: -44, y_legacy: 252 },
];
hexbin(shots, { radius: 10, x: (s) => s.x_legacy, y: (s) => s.y_legacy }).length;

Tags: docstring · hexbin. All sdvplot examples.