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

plotters-skill

v0.1.0

Published

High-performance plotting via Rust plotters, with a matplotlib pyplot-like API. Works in Node.js (native addon) and browser (WASM).

Readme

PlottersSkill

High-performance plotting for TypeScript / JavaScript, powered by the Rust plotters crate with a matplotlib pyplot-like API.

Works in Node.js (native addon via napi-rs) and the browser (WASM + SVG / Canvas via wasm-bindgen).

Quick Start

Node.js

npm install plotters-skill
import { figure } from 'plotters-skill';

const fig = figure();
fig.title('Hello PlottersSkill');
fig.plot([0, 1, 2, 3, 4], [10, 25, 18, 30, 22], {
  color: 'steelblue', label: 'Revenue',
});
fig.savefig('chart.png');

Browser (WASM)

import init, { figure } from 'plotters-skill';

await init();
const fig = figure();
fig.hist([1, 2, 2, 3, 3, 3, 4, 5], { bins: 10, color: 'steelblue' });
fig.draw(canvas);  // render to an HTML5 Canvas element

Chart Types

| Chart | figure() | axes() | Node | WASM | |-------|:----------:|:--------:|:----:|:----:| | Histogram | ✅ | — | ✅ | ✅ | | Pie / Donut | ✅ | — | ✅ | ✅ | | Box Plot | ✅ | — | ✅ | ✅ | | Area (fillBetween) | ✅ | ✅ | ✅ | ✅ | | Candlestick (OHLC) | ✅ | — | ✅ | ✅ | | Line | ✅ | ✅ | ✅ | ✅ | | Scatter | — | ✅ | ✅ | ✅ | | Bar | — | ✅ | ✅ | ✅ | | Step | — | ✅ | ✅ | ✅ |

API Overview

| Function | pyplot Equivalent | Description | |----------|-------------------|-------------| | figure() | plt.figure() | Single figure — hist, pie, plot, fillBetween, candlestick, boxplot | | axes() | fig, ax = plt.subplots() | Flexible Cartesian axes — mix plot, scatter, bar, step, fillBetween | | subplots(nrows, ncols) | plt.subplots(nrows, ncols) | Uniform NxM subplot grid | | gridFigure() | plt.subplot_mosaic() | Flexible grid — each row can have different column counts |

Examples

Multi-series overlay (auto-cycling colours)

import { figure } from 'plotters-skill';

const fig = figure();
fig.title('Sales Comparison');
fig.xlabel('Month');
fig.ylabel('Revenue');
fig.fillBetween(months, seriesA, { alpha: 0.3, label: 'Product A' });
fig.fillBetween(months, seriesB, { alpha: 0.3, label: 'Product B' });
fig.savefig('comparison.png');

Mixed series with axes()

import { axes } from 'plotters-skill';

const ax = axes();
ax.figsize(900, 540);
ax.title('Trend vs Actual');
ax.xlabel('x');
ax.ylabel('y');
ax.plot([0, 1, 2, 3, 4], [10, 25, 18, 30, 22], {
  color: 'steelblue', lineWidth: 2, label: 'Trend',
});
ax.scatter([0, 1, 2, 3, 4], [12, 20, 22, 28, 25], {
  color: 'coral', markerSize: 6, label: 'Actual',
});
ax.legend(true);
ax.savefig('chart.png');

Subplot grid

import { subplots } from 'plotters-skill';

const grid = subplots(1, 2);
grid.figsize(1200, 500);
grid.suptitle('Dashboard');

let ax = grid.ax(0, 0);
ax.hist(data, { bins: 25, color: 'steelblue' });
grid.setAx(0, 0, ax);

ax = grid.ax(0, 1);
ax.pie([40, 30, 20, 10], {
  labels: ['Web', 'Mobile', 'Desktop', 'Other'],
});
grid.setAx(0, 1, ax);

grid.savefig('dashboard.png');

Animated GIF (Node.js)

const frames = [];
for (let i = 2; i <= x.length; i++) {
  frames.push([{ x: x.slice(0, i), y: y.slice(0, i) }]);
}
fig.savegif('animation.gif', { frames, delayMs: 200 });

Output Formats

| Format | Node | WASM | |--------|:----:|:----:| | PNG file (savefig) | ✅ | — | | Animated GIF (savegif) | ✅ | — | | SVG string (render) | ✅ | ✅ | | HTML5 Canvas (draw) | — | ✅ |

Colours

Supports matplotlib tab10 palette (c0c9), common CSS names (steelblue, coral, gold, teal, …), and hex codes (#RRGGBB). Colours auto-cycle through tab10 when omitted in multi-series charts.

VS Code Extension

The PlottersSkill extension brings chart generation directly into VS Code via Copilot Chat. Install the .vsix or search for "PlottersSkill" in the marketplace.

@plotters Chat Participant

Type @plotters in Copilot Chat followed by a natural language description:

@plotters a histogram of 500 normally-distributed values with 30 bins
@plotters /pie revenue split: Web 40%, Mobile 30%, Desktop 20%, Other 10%
@plotters /line monthly sales for 2024 with three product lines

Slash commands: /histogram, /pie, /line, /scatter, /area, /boxplot, /candlestick, /axes, /subplots.

How it works

  1. Your prompt is sent to the Copilot LLM with the plotters-skill API reference
  2. The LLM generates a TypeScript script
  3. The script is type-checked against the .d.ts — errors are fed back for auto-fix (up to 3 retries)
  4. The passing script runs in a sandboxed VM — no filesystem or network access
  5. The rendered chart image is sent back to the LLM for verification
  6. The PNG is displayed inline in chat

Features

| Feature | Description | |---------|-------------| | Chart History | Gallery sidebar in Explorer — browse, re-render, or delete past charts | | Edit Script | One-click button opens the generated TypeScript with a "▶ Render Chart" CodeLens | | LLM Verification | Charts are verified against the original request; mismatches trigger automatic retry | | Inline Errors | Type-check and runtime errors shown in chat during retries | | Feedback Tracking | 👍/👎 on chat responses tracked for stats (PlottersSkill: Show Feedback Stats) | | Notebook Support | *.plotters-notebook files — TypeScript cells execute with inline PNG output | | Render from Editor | PlottersSkill: Render Chart from Active Editor — run any .ts script directly | | Configurable | Settings for retry count, VM timeout, preferred model, and source visibility |

AI Skill Installation

The bundled SKILL.md can be installed into any project so Copilot, Claude, or other AI tools automatically discover the plotters-skill API:

npx plotters-skill install-skill                    # all tools
npx plotters-skill install-skill --target copilot   # .github/skills/plotters-skill/
npx plotters-skill install-skill --target claude     # .claude/skills/plotters-skill/

Development

See DEV.md for prerequisites, build commands, tests, and project structure.

License

MIT