npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gcu/plot

v0.1.1

Published

Matplotlib-style plotting for the browser: subplots, plot, scatter, imshow, hist, bar. Canvas-based, zero runtime dependencies.

Readme

@gcu/plot

Matplotlib-style plotting for the browser. Canvas-based, zero runtime dependencies. Thin familiar API: subplots, plot, scatter, imshow, hist, bar.

Part of Auditable.

Pre-1.0 — APIs may break on minor version bumps.

Install

npm install @gcu/plot

Usage

import { subplots, scatter } from '@gcu/plot';

const { fig, ax } = subplots(1, 1);
ax.scatter([1, 2, 3, 4], [1, 4, 9, 16]);
ax.xlabel('x');
ax.ylabel('y²');
document.body.append(fig.canvas);

Quick helpers (plot, scatter, imshow, hist, bar) accept an options object with ax to target an existing axes, otherwise create a new figure.

subplots(R, C) with both R and C greater than 1 returns a nested 2D axes array (matplotlib shape, for [[a,b],[c,d]] = ... destructuring) with a non-enumerable .flat property carrying the row-major flat axes list — mirrors matplotlib's ndarray.flat, so axes.flat[k] works without manual row/col math.

Style palette

plt.style.use(name) swaps the module-level palette read by Axes / Figure / legend fallbacks (per-Axes _bgcolor / _textColor / _gridColor / _frameColor overrides still win). Default is auditable-native dark (#1a1a1a plot bg, #ccc text, transparent figure facecolor). 'default' / 'classic' / 'matplotlib' / 'seaborn' / 'ggplot' / 'bmh' flip to a light matplotlib-shape palette (white plot bg, dark text, opaque #fafafa figure card). 'dark_background' restores dark. Unknown names are silently ignored.

Figure layout extras

  • gap / wspace / hspace (px, default 10) on subplots(..., { gap }) or Figure — inter-subplot spacing.
  • Figure-level fig._rowLabels / fig._colLabels (arrays of strings) render in 28px-left / 18px-bottom gutters reserved outside the subplot grid. Used by sadpan.plotting.scatter_matrix to live the column names on the figure edges instead of cluttering each cell with axis labels.
  • Per-Axes ax._margins = {left, right, top, bottom} overrides the label/tick-driven margin computation — lets a grid of cells pin identical plot rects.
  • aspect='equal' for imshow-dominated axes shrinks the plot rect to match data aspect (was: expanded the data range). colorbar is pinned to the cell's right edge using the pre-aspect plot height so it doesn't shrink along.

Matplotlib compatibility

  • scatter default marker size is 20 (matplotlib parity; was 4).
  • scatter accepts plural matplotlib forms edgecolors / linewidths as aliases for edgecolor / linewidth.
  • plot / scatter / bar / barh coerce x/y/heights/widths through _toArr at trace ingress, so sadpan Series / numpy-shaped wrappers without a .length plot correctly.

License

MIT.