SVG Graph

SVG Graph is a script library that creates mathematical graphs with Cartesian, logarithmic, or polar coordinates.  Shapes and text labels may be added using the actual graph coordinates, centered on the origin.  One may pan and zoom the graph, and use the resulting coordinates to fine-tune the graph itself.  Graphs may be saved as inline or external .svg files, or .png images.

Area under a parabola


\( % MathJax is loading . . . . y = x^2 / 3 \)

Interactive mouse and keyboard events
drag:
leftpan
left + Hpan horizontally
left + Vpan vertically
rightzoom
right + Czoom from center
right + Lzoom from lower left
left + Rresize canvas
right + Rresize contents
both + Rresize everything
left click while holding:
Ccenter origin
Lorigin to lower left
Hsave HTML to the textarea
Psave parameters to the textarea
Tsave tooltip to the textarea
Dredraw graph with parameters from the textarea (id’s must match)
Ssave graph as png
double click:  reset
press  [  to enable the tooltip,  ]  to hide
  (x or r, y or theta | xMin, xMax, yMin, yMax | ww × hh)


Please visit russellcottrell.com | blog