mauriciopoppe

mauriciopoppe /function-plot

A 2d function plotter for the web

1,000
118

Repository Statistics

Key metrics and engagement data

1.0k
Stars
118
Forks
9
Open Issues
0
Releases
1.12
Engagement Rate
Default branch: master

Timeline

Repository has been active for 10 years, 5 months

Repository Created

Last Activity
Inactive for NaN months

README.md

image

js-standard-style NPM

Repository image
js-standard-style


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!

Installation

sh
1npm install function-plot

Usage

javascript
1import functionPlot from 'function-plot'
2functionPlot({
3 target: '#root',
4 data: [
5 {
6 fn: 'x^2',
7 derivative: {
8 fn: '2*x',
9 updateOnMouseMove: true
10 }
11 }
12 ]
13})

Check all the examples in the homepage

Resources

License

2015-2023 MIT © Mauricio Poppe

FOSSA Status