Info.curvecolor="red" Info.graphleft=Info.graphtop=50prior to the call to
GRdrawgraph()
. Then be sure to include the Info parameter (the 4th parameter).
"NaN" is a special way in JavaScript of showing that a value is "not any number."
parameter | default value | comments |
---|---|---|
alert | "" | message to be sent to the user after display is complete. |
anchor | "0,0" | the top left-hand corner of the graphing "window" or the name of an element of the page such as an image upon which the graph is based. For example, using
<img name=anchor src=transp.gif width=300 height=300>
would require Info.anchor=anchor .
Setting this paramenter to a named element on the page allows resizing of the graph to occur correctly. If an element is indicated, place "onresize=GRresize()" in the body tag as well.
|
append | false | set Info.append=true to indicate that the previous graph should be used as a base for this one. No axes will be drawn, and the previous x/y range will be used.
|
bgcolor | "" | "color" of plotting surface (default is no plotting surface). If defined as, for example, Info.bgcolor="red" , then red.gif must be available.
|
curvecolor | black | color of the spline curve for (x,y) data. Set to a blank string ("") to indicate that the curve color is to come from the point color, and color is being used to separate curves. In that case, data must be sequential, with increasing x. |
datatransform | "y vs. x" | functions to apply to the data--for example, ln(y) vs. 1/x or sqrt(y) vs. x^2 |
debug | false | set Info.debug=true to get alerts related to debugging
|
defaultcolor | "" | default color for the function to be drawn or for (x,y) points indicating no color. If this is left blank, and a color is indicated for a point, then that color will be taken as the default for future points. That is, a change of color need only be indicated once when the default color is not specified. |
docurve | * | *default is true for functions and false for data. Set Info.docurve=true to include a cubic spline for (x,y) data or set Info.docurve=false to NOT smooth f(x).
|
dogridx | false | set Info.dogridx=true to display vertical grid lines along with the x-axis tics.
|
dogridy | false | set Info.dogridy=true to display horizontal grid lines along with the y-axis tics.
|
dopoints | true | set Info.dopoints=false to not display x,y points or to draw smooth functions.
|
doptlabels | true | set Info.doptlabels=false to not display "alternative" tags when the point is moved over with the mouse.
|
dotrendline | false | set Info.dotrendline=true to draw a trend line for (x,y) data. On return, GR.L.m is the slope, and GR.L.b is the intercept.
|
dotrendeqn | true | set Info.dotrendeqn=true to show the trend line equation y = m x + b. Ignored if Info.dotrendline=false .
|
doxaxis | true | set Info.doxaxis=false to turn off the x-axis.
|
doxticnums | false | set Info.doxticnums=true to show numbers along with the major x-axis tics.
|
doxtics | true | set Info.doxtics=false to turn off x-tics.
|
doyticnums | false | set Info.doyticnums=true to show numbers along with the major y-axis tics.
|
doyaxis | true | set Info.doyaxis=false to turn off the y-axis.
|
doytics | true | set Info.doytics=false to turn off y-tics.
|
graphheight | 200 | plotting surface height, in pixels |
graphleft | 50 | plotting surface left, in pixel |
graphtop | 50 | plotting surface top, in pixels |
graphwidth | 200 | plotting surface width, in pixels |
histogram | 0 | set Info.histogram=1 for vertical bars; set Info.histogram=2 for horizontal bars
|
imagedir | . | directory for GIF images that are used for colors |
info | "" | document status to display while running (not working?) |
keepopen | false | set Info.keepopen=true to prevent resetting of variables. Required any time Info.append=true is used in the NEXT plot. Automatically set to true if Info.maxaddpoints is greater than 0.
|
key | "" | add a color key for multiple data sets. For example, "red=Sample 1;blue=Sample 2;green=Sample 3" |
keyx | 200 | horizontal position for key information, in pixels from the left |
keyy | 60 | vertical position for key information, in pixels from the top |
labelsonly | false | set labelsonly=true to draw labels instead of points with ALT tags
|
linewidth | 1 | line width for curves and trend lines, in pixels |
majorticlength | 8 | length of major tics in pixels |
maxaddpoints | 0 | the number of points to allow the user or program to add AFTER display. (NOTE: for printing in Netscape Navigator, a call to GRreplot() is necessary after adding points. See example8.htm) |
minorticlength | 5 | length of minor tics in pixels |
onmousedown | null | name of the function to use for processing mouse down events. See examplec.htm |
onmousemove | null | name of the function to use for processing mouse move events. See examplec.htm |
onmouseup | null | name of the function to use for processing mouse up events. See examplec.htm |
overwrite | 0 | Set Info.overwrite to a graph number to overwrite a graph, reusing the points. If you do this, the exact same number of points must be present in the overwritten function.
|
ptsize | *see note | size for lines, curves and data points in pixels (defaults are 4 for points and 1 for lines). |
quicktrend | true | draw a quick trend line using files line1.gif and line2.gif. Lines close to vertical or horizontal will be dotted. |
style | "" | cascading style information for the plot. For example, body {background-color:silver} . Built-in style
classes are shown below, with defaults indicated:
.body {font-size:10pt;color:black} .keylabel {font-size:10pt;font-weight:bold;color:black} .ptlabel {font-size:10pt;font-weight:normal;font-style:italic} .trendeqn {font-size:10pt;font-weight:normal;color:black} .xaxisnum {font-size:10pt;font-weight:normal;color:black} .xlabel {font-size:10pt;font-weight:normal;color:black} .yaxisnum {font-size:10pt;font-weight:normal;color:black} .ylabel {font-size:10pt;font-weight:normal;color:black} |
ticwidth | 2 | width of tics, in pixels. |
title | "" | title for the plot. Include any HTML tags you want. |
trendcolor | black | color of the trend line for (x,y) data |
trenddigits | –3 | number of digits of precision for the trend-line equation. Positive numbers indicate fixed notation; negative numbers indicate to use scientific notation. If unspecified, automatic |
trendlabelx | 60 | horizontal position for trend-line equation, in pixels from the left |
trendlabely | 60 | vertical position for trend-line equation, in pixels from the top |
xaxisaty | 0 | vertical position for x-axis, in user coordinates |
xaxislabel | "x" | label for the x-axis |
xaxislabelx | * | x-axis label x-position. Default is just to the right of the x-axis. Specify this in user coordinates. Specifying Info.xaxislabelx=NaN indicates roughly centered on the plotting surface
|
xaxislabely | * | x-axis label y-position. Default is in line with the y axis. Specify this in user coordinates. Specifying Info.xaxislabely=NaN indicates 30 pizels to the right of the right edge of the graph.
|
xclip | true | set Info.xclip=false to allow data to extend beyond the plotting surface horizontally.
|
xmax | NaN | maximum for x. Setting Info.xmax=NaN indicates that it should be determined on the fly (by prompt for functions of x, or based on the data for x,y data).
|
xmin | NaN | minimum for x. If Info.xmin > Info.xmax , then the axis will run backwards, from right to left
|
xnumdigits | NaN | number of digits of precision for the x-axis numbers. Positive numbers indicate fixed notation; negative numbers indicate to use scientific notation. If unspecified, automatic |
xstep | 1 | a factor used to make plotting of functions and trendlines faster. |
xticfirst | NaN | lowest x-number to get a tic, in user units. If left undefined while any of Info.xticmajor , Info.xticminor , or Info.doxticnums is defined, then it is set to the value of Info.xmin , either as defined or as determined.
|
xticmajor | "auto" | distance between major x-axis tics, in user units. Setting Info.xticmajor=NaN or a negative value turns off major x-axis tics.
|
xticminor | "auto" | distance between minor x-axis tics, in user units. Setting Info.xticminor=NaN or a negative value turns off minor x-axis tics.
|
xvar | "x" | x-variable name to use if not "x" in the trend equation and for the x-label. Setting this ONLY affects labels, not calculation. To transform the data, use Info.datatransform .
|
yaxisatx | 0 | horizontal position for y-axis, in user coordinates |
yaxislabel | "y" | label for the y-axis |
yaxislabelx | * | y-axis label x-position. Default is in line with the x-axis. Specify this in user coordinates. Specifying Info.yaxislabelx=NaN indicates 50 pixels left of the left edge of the graph.
|
yaxislabely | * | y-axis label y-position. Default is in just above the y axis. Specify this in user coordinates. Specifying Info.yaxislabely=NaN indicates roughly centered vertically on the plotting surface.
|
yclip | true | set Info.yclip=false to allow f(x) and data to extend beyond the plotting surface vertically.
|
ymax | NaN | maximum for y. Setting Info.ymax=NaN indicates that it should be determined based on the data or function values.
|
ymin | NaN | minimum for y. If Info.ymin > Info.ymax , then the axis will run backwards, from top to bottom.
|
ynumdigits | NaN | number of digits of precision for the y-axis numbers. Positive numbers indicate fixed notation; negative numbers indicate to use scientific notation. If unspecified, automatic |
yticfirst | NaN | lowest y-number to get a tic, in user units. If left undefined while any of Info.yticmajor , Info.yticminor , or Info.doyticnums is defined, then it is set to the value of Info.ymin , either as defined or as determined.
|
yticmajor | "auto" | distance between major y-axis tics, in user units. Set to auto for automatic calculation. Setting Info.yticmajor=NaN or a negative value turns off major y-axis tics.
|
yticminor | "auto" | distance between minor y-axis tics, in user units. Set to auto for automatic calculation. Setting Info.yticminor=NaN or a negative value turns off minor y-axis tics.
|
yvar | "y" | y-variable name to use if not "y" in the trend equation and for the y-label. Setting this ONLY affects labels, not calculation. To transform the data, use Info.datatransform .
|