Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

regl-splom

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regl-splom

Scatterplot matrix for 2d plots

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
186K
increased by2.3%
Maintainers
1
Weekly downloads
 
Created
Source

regl-splom

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

  • 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:

OptionDescription
dataAn array with arrays for the columns.
rangeArray with data ranges corresponding to data. Every range can be an array [min, max] or [minX, minY, maxX, maxY]. If undefined - detected automatically.
domainArray 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.
paddingPadding 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, opacityPoints style.
markerPoints marker.
diagonalShow or hide diagonal.
upperShow or hide upper half matrix.
lowerShow or hide lower half matrix.
viewportArea 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

License

© 2018 Dmitry Yv. MIT License

Development supported by plot.ly.

Keywords

FAQs

Package last updated on 01 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc