Skip to main content

surface

import * as Plot from "@observablehq/plot";
import { loadLeague } from "@sportsdataverse/sdvplot";
import { surface } from "@sportsdataverse/sdvplot/plot";

await loadLeague("nhl");
// arcResolution: points per arc (default 200); 24 is plenty at 480 px and keeps the SVG small
const rink = surface("nhl", { team: "BOS", displayRange: "offense", arcResolution: 24 });
Plot.plot({ ...rink.scales, width: 480, marks: rink.marks });

Tags: docstring · surface. All sdvplot examples.