Created
June 5, 2016 05:31
-
-
Save migsalazar/9c20c11359de10a922dabf0c49f67524 to your computer and use it in GitHub Desktop.
Plotting with Canvas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context.beginPath(); | |
for (var x = xstart; x < width; x++) { | |
xreal = (x / (xorigin)) - x0, | |
yreal = height - ((f(xreal) - y0) * _yscale); | |
context.lineTo(xreal, yreal); | |
} | |
context.stroke(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment