mauriciopoppe / function-plot

A 2d function plotter for the web

Home Page:https://mauriciopoppe.github.io/function-plot/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
    }
  }]
})

Resources

License

2015-2023 MIT © Mauricio Poppe

FOSSA Status

About

A 2d function plotter for the web

https://mauriciopoppe.github.io/function-plot/

License:MIT License


Languages

Language:TypeScript 47.7%Language:JavaScript 24.4%Language:HTML 23.2%Language:CSS 4.6%Language:Pug 0.2%