How to customize the General Function Explorer (GFE)

Normally when GFE starts up, it displays a default chart. You can alter what is initially displayed by attaching parameters to the URL of the web page. You can override some or all the controls to display whatever initial chart you would like. This will also be the chart GFE will return to when the user clicks on 'reset'.

For example, you can set up chart with all the functions and ranges as you want them, so in a lecture the chart will come up that way immediately. You can set up an unlimited number of different charts this way.

Normally the URL of the GFE looks like this:

mathopenref.com/graphfunctions.html

To customize the chart, attach parameters to the end of the URL:  *

• First add a question mark (?)
• Then add a parameter as a name/value pair separated by an equals sign. For example:
mathopenref.com/graphfunctions.html?gx=cos(x)
This will cause GFE to start up with cos(x) as the second function.
• If you wish to add more parameters, add an ampersand & followed by another parameter.
For example:
mathopenref.com/graphfunctions.html?fx=sin(x)&gx=tan(x)
will set the first two functions.
• Continue until you have added all the parameters you wish.
There should be no spaces or line breaks in the URL. The parameter names and values are not case-sensitive. The parameters can be in any order. A complete set of available parameters is listed below.

### Note on numeric values

If a parameter expects a numeric value and you supply something else, it will display as "NaN", which is short for "Not a Number".

## How to use in a web page

You can create a link in a web page that will take the user to GFE. By adding parameters to the href, you can control how the GFE looks when it is initially displayed. For example:

<a href="mathopenref.com/graphfunctions.html?thick=true">GFE</a>
This will start the GFE with the line thickness set to a thick line.

## How to use in Word documents

In Microsoft Word, you insert a link to a web page in the document using the "insert link" menu command. When you do this you will have the opportunity to specify the link text and the address to go to when the user clicks on the link. Simply provide the address with the extra optional parameters to customize how GFE will look when it first comes up. For example:

mathopenref.com/graphfunctions.html?fx=tan(x)&cursor=true
This will start the GFE with the first function set to tan(x) and the cursor initially turned on.

## Parameters

This is a list of the parameters you can add to the URL. Any you do not provide will take on the default values shown.

Each parameter is available in both long form and short form (shown in parentheses). Use either one. The short form is useful for complex charts that can result in a URL too long for some programs. (For example, in Microsoft Word a hyperlink URL must be less than 256 characters.) The "save as link" command outputs the URL using the short forms.

When a parameter is true/false, the following rules apply: If the value is "true" or "t" it is interpreted as true. All other values are interpreted as false. Not case-sensitive.

 Description Default Example fx The expression that is used for the first function f(x) sin(a*x) fx=sin(6*x) gx The expression that is used for the second function g(x) empty gx=tan(x) hx The expression that is used for the third function h(x) empty gx=a*sin(x) relopf (rf) Relational operator for f(x)   (see note below) 0 relopf=2 relopg (rg) Relational operator for g(x)   (see note below) 0 relopg=1 reloph (rh) Relational operator for h(x)   (see note below) 0 reloph=3 showf (sf) If true, show the graph for f(x), hidden for any other value true showf=false showg (sg) If true, show the graph for f(g), hidden for any other value true showg=t showh (sh) If true, show the graph for f(h), hidden for any other value true sh=false xmax (xh) The high end of the range of values on the x-axis 4 xmax=8 xmin (xl) The low end of the range of values on the x-axis -4 xmin=-8 ymax (yh) The high end of the range of values on the y-axis -3 ymax=7 ymin (yl) The low end of the range of values on the y-axis -3 ymin=-6 amax (ah) The value at the top end of the slider for variable A 4 amax=10 amin (al) The value at the bottom end of the slider for variable A 0 amin=–3 aval (a) Initial value for the slider for variable A 2 a=7.5 bmax (bh)bmin (bl)bval (b) As above but for slider B 401 cmax (ch)cmin (cl)cval (c) As above but for slider C 401 dmax (dh)dmin (dl)dval (d) As above but for slider D 401 thick (th) If true the graph lines are bold (thick) false thick=true mono (ms) If true, inequlaities are shaded in a uniform gray color false mono=true snap (sn) If true, the sliders will only stop at whole numbers false sn=t grid (gr) If true, the grid and axis labels will be displayed true gr=f cursor (cr) If true the cursor is initially on false cr=t cursorx (cx) The initial value for the cursor x 1 cursorx=1.2

## Relational operators

These are the values selected in the pull down menu to the left of each function. They are encoded as numbers in the relopf, relopg, and reloph parameters as follows:
 0 = Equals 1 < Less than 2 <= Less than or equals 3 > Greater than 4 >= Greater than or equals

## *HTML forms

HTML experts will recognize this as the same format as the GET method of posting requests from HTML forms. You could in fact invoke GFE from an HTML form.