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

function-plot

Package Overview
Dependencies
Maintainers
0
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

function-plot

A simple 2d function plotter powered by d3

  • 1.25.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3K
increased by30.72%
Maintainers
0
Weekly downloads
 
Created
Source

image

NPM js-standard-style storybook


function-plot is a powerful library built on top of D3.js whose purpose is to render functions with little configuration, think of it as a little clone of Google's plotting utility: y = x * x

The library currently supports interactive line charts and scatterplots, whenever the graph scale is modified the function is evaluated again with the new bounds, result: infinite graphs!

Edit function-plot

image,

Thanks to @liuyao12 for the initial version of the Observable notebook, you can check his own version here https://beta.observablehq.com/@liuyao12/function-plot

Installation

npm install function-plot

Usage

import functionPlot from 'function-plot'
functionPlot({
  target: '#root',
  data: [{
    fn: 'x^2',
    derivative: {
      fn: '2*x',
      updateOnMouseMove: true
    }
  }]
})

Check more examples in the homepage

Check the available options in the docs

License

2015-2023 MIT © Mauricio Poppe

FOSSA Status

Keywords

FAQs

Package last updated on 02 Nov 2024

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