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

mol_plot_all

Package Overview
Dependencies
Maintainers
1
Versions
1200
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mol_plot_all

Fastest plot lib for vector graphics.

  • 1.2.38
  • npm
  • Socket score

Version published
Weekly downloads
1K
increased by83.06%
Maintainers
1
Weekly downloads
 
Created
Source

$mol_plot

Fastest plot lib for vector graphics.

Benchmarks

  • Ropes
  • Bars

Real life usages

NPM usage

npm install mol_plot_all

import {
	$mol_plot_pane,
	$mol_plot_map_heat,
	$mol_atom2,
} from 'mol_plot_all'

// constants
const width = 20;
const height = 200;
const length = width * height;

// prepare heat map graph
const map = new $mol_plot_map_heat();
map.series_x = () => Array.from({ length }, (_, i) => i % width);
map.series_y = () => Array.from({ length }, (_, i) => Math.floor(i / width));

// make observable atom
const source = new $mol_atom2
// define memoized calculation
source.calculate = ()=> Array.from({ length }, (_, i) => Math.floor(Math.random() * 20) * 1000);
// enforce update data every second 
setInterval( ()=> source.obsolete(), 1000 )
// connect dynamic provider with graph
map.series_z = () => source.get()

// prepare pane for graphs
const pane = new $mol_plot_pane();
// connect zoom with Y axis
pane.zoom = next => pane.scale_y( next )
// provide graphs to map
pane.graphs = () => [map];

// place pane to document
document.body.appendChild(pane.dom_node());
// activate dynamic behaviour
const alive = pane.autorun()

// deactivate
// alive.destructor()

Online sandbox

FAQs

Package last updated on 05 Sep 2021

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