This applet allows to enter and plot functions of one variable.

Enter expression with a variable x to be plotted, number of points to calculate and range of your variable in the corresponding textfields below the plotting area. Press the button "Plot the Function!"

Please note that recognition of function expressions is not fool proof. If the plotted curve looks wrong to you, use parenthesis to force the order of evaluation, see example below. The most likely place this will be needed in the use of power command ^.

Example: (1+(x^2)+(x^3))

The applet uses Graph Class Library by Leigh Brookshaw. Below are excerpts from the Library Documentation :

Use the following commands to create formula for your function:

List of Recognized Commands

  • ( ) parenthesis , comma
  • +, -, unary -, unary +
  • *, /
  • ^ - raise to a power
  • pi, e - constants
  • log - natural logarithm function
  • sin, cos, tan
  • asin, acos, atan
  • sqrt - square root
  • rand - random number function
  • exp - exponential functiuon
  • remainder
  • atan2
  • Special Functions
  • Scientific notation using "e", "E", "d", "D".
  • Known Bugs: The recoginition of function expressions is not fool proof. If the answer is wrong then use the parenthesis to force the order of evaluation. The most likely place this will be needed is in the use of the power command. The exponent is not evaluated correctly if it begins with a unary operator.

    Once the function is plotted, you can modify with a mouse the range of data being plotted:

    Mouse Events

  • MouseDown: Starts the range selection
  • MouseDrag: Drag out a rectangular range selection
  • MouseUp: Replot with modified plotting range.

  • The applet also recognizes the following keys being pressed:

    Recognized Keys When Pressed

  • R - Redraw plot with default limits
  • r - Redraw plot using current limits
  • m - Pop window to enter manually plot range
  • c - Toggle pop-up window that displays the mouse position in user coordinates
  • d - Show coordinates of the closest data point to the cursor
  • D - Hide data coordinates pop-window
  • h - This key pressed in Any pop-window at any-time will hide it.

  • Distribution

    Return to PHY211 Homepage