graphy.js - Simple HTML5 Canvas Graphing
A HTML5 Canvas Library For Graphing Functions
An example here: http://jsfiddle.net/shrimpboyho/57wZW/
##How to Install
Include the library in your HTML as follows:
<script src="graphy.js"></script>
<script src="your_code.js"></script>
##Documentation
Create a new Graphy()
object and send in a canvas.
var canvas = document.getElementById('myCanvas');
var graphymachine = new Graphy(canvas);
Set up some settings such as the number of pixels per one unit and the origin and whether a grid should be present.
graphymachine.setPixelsPerUnit(20);
graphymachine.setOrigin(200,200);
graphymachine.drawGrid();
Graph the function by calling the graph()
method with an equation, a color, and line thickness as your arguments.
graphymachine.graph("x * Math.sin(10 * x)", "orange",2);