Note these graphs are stored locally and will not be available on another computer or different browser. To store a graph permanently, please save it to your hard drive.
To see the source code for Graphit and/or contribute, comment on, or suggest features for Graphit, visit the development site on Github: https://github.com/siefkenj/graphit
Graphit allows you to create and save mathematical plots directly from your browser. A graph is defied by javascript code and then converted to SVG with a modified version of the ASCIIsvg library.
To create a graph, go to the Graph tab and enter
your graph commands into the text box. Every graph should start with
initPicture(min_x,max_x,min_y,max_y)
. Axes can be added with
the axes
command and plots can be added with plot
.
See the Examples tab for examples on how to use these
commands.
When you've modified the code for a graph, click .svg
if it does not end in .svg
already.
If you later decided you want to edit an svg created with
graphit that you have saved to your computer,
you can click
The code used to make a graph with graphit is actually real (slightly-preparsed)
javascript code. That means any javascript constructs (for example,
multiple commands on a single line with ;
) are usable with
graphit. All graphing parameters (like fontsize
, etc.)
are javascript variables and graphing commands are javascript functions
(e.g. initPicture(-4.3,4.3,-3.3,3.3)
) which use any pertinent
global variables to issue the appropriate SVG drawing operation.
Using global variables like this gives the appearance of a stack-based
graphing language. Since commands reference global variables, one must
take care not to use the var
keyword to define a graphing
parameter, since it would then be a local variable and have no affect
on graphing commands.
#rrggbb
or #rgb
where r
, g
, b
are red, green, blue respectively taking values from 0 to 255
for the two-digit-per-color case and 0-15 for the one-digit-per-color
case.