Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mauriciopoppe/function-plot
A 2d function plotter for the web
https://github.com/mauriciopoppe/function-plot
desmos evaluation-functions function function-plot graph plot plotter
Last synced: 29 days ago
JSON representation
A 2d function plotter for the web
- Host: GitHub
- URL: https://github.com/mauriciopoppe/function-plot
- Owner: mauriciopoppe
- License: mit
- Created: 2015-03-31T07:06:17.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-09-21T06:54:59.000Z (about 2 months ago)
- Last Synced: 2024-10-11T06:42:23.160Z (about 1 month ago)
- Topics: desmos, evaluation-functions, function, function-plot, graph, plot, plotter
- Language: TypeScript
- Homepage: https://mauriciopoppe.github.io/function-plot/
- Size: 6 MB
- Stars: 928
- Watchers: 20
- Forks: 113
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![image](https://user-images.githubusercontent.com/1616682/93912098-23060300-fcb8-11ea-823f-be8dfe9c24b9.png)](http://mauriciopoppe.github.io/function-plot/)
---
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](https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&es_th=1&ie=UTF-8#q=y+%3D+x+%5E+2)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](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/muddy-cdn-ibl5x?fontsize=14&hidenavigation=1&theme=light)
[![image](https://user-images.githubusercontent.com/1616682/93041565-a9a84980-f601-11ea-900e-4e6809b5fa96.png)](https://observablehq.com/@mauriciopoppe/function-plot),
Thanks to [@liuyao12](https://github.com/liuyao12) for the initial version of the Observable notebook, you can check his own version here https://beta.observablehq.com/@liuyao12/function-plot
## Installation
```sh
npm install function-plot
```## Usage
```javascript
import functionPlot from 'function-plot'
functionPlot({
target: '#root',
data: [
{
fn: 'x^2',
derivative: {
fn: '2*x',
updateOnMouseMove: true
}
}
]
})
```## Resources
- [All examples in the homepage](https://mauriciopoppe.github.io/function-plot/)
- [API docs](https://mauriciopoppe.github.io/function-plot/docs/functions/default-1.html)
- [Want to know how it works? Read the design docs](./design/)
- [Render pipeline](./design/pipeline.md)
- [Web workers](./design/web-workers.md)## License
2015-2023 MIT © Mauricio Poppe
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmauriciopoppe%2Ffunction-plot.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmauriciopoppe%2Ffunction-plot?ref=badge_large)