Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laktak/js-graphy
Graphing Calculator that evals JavaScript
https://github.com/laktak/js-graphy
graphing-calculator javascript playground
Last synced: about 2 months ago
JSON representation
Graphing Calculator that evals JavaScript
- Host: GitHub
- URL: https://github.com/laktak/js-graphy
- Owner: laktak
- License: other
- Created: 2015-07-08T16:56:50.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-07-07T09:09:32.000Z (about 3 years ago)
- Last Synced: 2024-07-01T19:42:25.592Z (3 months ago)
- Topics: graphing-calculator, javascript, playground
- Language: JavaScript
- Homepage: https://laktak.github.io/js-graphy/
- Size: 151 KB
- Stars: 48
- Watchers: 5
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# js-graphy Playground
This playground allows you to visualize, test, tweak and play with your mathematical JavaScript functions.
[Open the live playground!](https://laktak.github.io/js-graphy/)
To add a graph simply call `graph.add()` with your function. The only argument is x with y expected as the return value.
```js
graph.add(function(x) { return x*x; });
```You can use normal JS code:
```
// add another graph
function easing(x) {
return x + 0.3 * Math.sin(2 * Math.PI * x);
}
graph.add(easing);
```Set colors:
```js
graph.add(function(x) { return -Math.round(x*x); }, "#00ff00");
```To include external libraries use `// script="URL"`:
```js
// script="https://cdnjs.cloudflare.com/ajax/libs/mathjs/1.7.0/math.min.js"
graph.add(function(x) { return math.cube(x); });
```## Gists
If you want to share your playground
- create a gist with your code
- and append your *gist-id* to the playground url:https://laktak.github.io/js-graphy/#gist=f8944fa044d972456d35
## Thanks
Graphs are based on the [JavaScript Graphing Calculator by Richard Ye](https://github.com/yerich/Graphr).
Editing made possible by the [Ajax.org Cloud9 Editor](https://github.com/ajaxorg/ace).