https://github.com/samuelnovaes/plot-it
Plot advanced charts in Node.js
https://github.com/samuelnovaes/plot-it
Last synced: about 1 month ago
JSON representation
Plot advanced charts in Node.js
- Host: GitHub
- URL: https://github.com/samuelnovaes/plot-it
- Owner: samuelnovaes
- Created: 2018-08-02T06:04:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-21T05:54:47.000Z (over 6 years ago)
- Last Synced: 2025-03-18T12:11:23.442Z (2 months ago)
- Language: CSS
- Homepage:
- Size: 613 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Plot It
Plot advanced charts in Node.js. Plot It uses [plotly.js](https://plot.ly/javascript/).### With hot reload!
# Install
`npm i -g plot-it`
# Demo (Using [safe-range](https://github.com/samuelnovaes/safe-range) to create range)
- Create a directory for your project.
- Run `npm init -y`.
- Run `npm i safe-range`.
- Create an index.js file.```javascript
const range = require('safe-range')
const r = range(-10, 10, 0.1)//Functions
const f = x => Math.sin(x)
const g = x => x ** 2module.exports = [
{
x: r,
y: r.map(f),
name: 'f(x) = sin(x)'
},
{
x: r,
y: r.map(g),
name: 'g(x) = x²'
}
]
```- Run `plot-it`.

> Press F5 to force refresh if necessary.
> Press F12 to show data table

# [Reference](https://plot.ly/javascript/reference/)