Skip to main content

cellsVsDistance

[
  {
    "x": 0,
    "y": 0,
    "attempts": 1,
    "makes": 1,
    "fgPct": 1,
    "meanDistance": 0,
    "zone": "restricted_area",
    "leagueFgPct": 0.5
  }
]
import { cellsVsDistance, fgPctByDistance } from "@sportsdataverse/sdvplot/shots";

const made = { x_legacy: 0, y_legacy: 0, shot_distance: 0, shot_value: 2, shot_result: "Made" };
const missed = { ...made, shot_result: "Missed" };
cellsVsDistance([made], fgPctByDistance([made, missed]), { shape: "square", side: 10 });

Tags: docstring · cellsVsDistance. All sdvplot examples.