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 🙏

© 2024 – Pkg Stats / Ryan Hefner

regl-splom

v1.0.14

Published

Scatterplot matrix for 2d plots

Downloads

741,783

Readme

regl-splom

Matrix of scatter plots. A wrapper over regl-scatter2d for optimized intersected data rendering.

  • [x] minimal GPU memory footprint: N vs N*N in direct regl-scatter2d passes case.
  • [ ] optimized performance due to binary trees for 1d point clustering, opposed to default 2d quad clustering.

Usage

npm install regl-splom

let regl = require('regl')({extensions: 'oes_element_index_uint'})
let createMatrix = require('regl-splom')

let scatterMatrix = createMatrix(regl)

// pass data and views to display
scatterMatrix.update(
	{ data: [[], [], ...], ranges, domains, viewport, size, color, border },
	{ data: [[], [], ...], ranges, domains, viewport, size, color, border }
)

// draw views by ids
scatterMatrix.draw(0, 1, ...views)

API

splom = createSplom(regl)

Creates scatter matrix instance.

splom.update(trace1, trace2, ...traces)

Define passes for draw method. Every trace can include the following options:

Option | Description ---|--- data | An array with arrays for the columns. range | Array with data ranges corresponding to data. Every range can be an array [min, max] or [minX, minY, maxX, maxY]. If undefined - detected automatically. domain | Array with domains for the data, ie. the area data dimension holds within the viewport. Each domain can be an array [min, max] for symmetric placement or [minX, minY, maxX, maxY] for precise position. Domain values are from 0..1 interval, defining what area of the viewport a dimension holds. By default domains cover viewport evnely. padding | Padding within domains (in px), or list of paddings per-domain. By default [0,0,0,0]. Can be a number, an array or any rectangle format. color, size, borderColor, borderSize, opacity | Points style. marker | Points marker. diagonal | Show or hide diagonal. upper | Show or hide upper half matrix. lower | Show or hide lower half matrix. viewport | Area that the plot holds within the canvas. Can take any rectangle format.

splom.draw(...ids?|...points?)

Draw all defined passes, or only selected ones provided by ids. Optionally define point indexes to render.

// draw 1 and 3 passes
splom.draw(1, 3)

// draw 1, 2 and 3 points from the first pass and 3 point from the second pass
splom.draw([1, 2, 3], [3])

splom.destroy()

Dispose renderer and all the associated resources

Related

License

© 2018 Dmitry Yv. MIT License

Development supported by plot.ly.