Home

JSPlot Documentation: Plotting functions

  1. The plotting canvas
  2. Plotting data
  3. Plotting functions
  4. Vector graphics
  5. Graph plotting styles
  6. Graph options
  7. Graph axis options
  8. Vector graphics objects

Documentation lives here.

JSPlot_FunctionEvaluator class: API reference

Instances of the JSPlot_FunctionEvaluator class are used to automatically generate datasets (instances of the JSPlot_DataSet class) by evaluating Javascript functions.

my_function = new JSPlot_FunctionEvaluator(title, styling, functions);

Argument Allowed values Description
title String The label for this dataset in the graph's legend. Set to a blank string to create no legend entry for this dataset.
styling Associative array An associative array of styling options for this dataset. Allowed key values are listed here.
functions Array

An array of Javascript functions which should be evaluated to produce each column of the data set.

Once instantiated, the following methods of the JSPlot_FunctionEvaluator class can be used to generate JSPlot_DataSet instances:

Method Arguments Description
evaluate_linear_raster x_min – number
x_max – number
point_count – number
auto_update – boolean
Evaluate the functions at point_count linearly-spaced points between x_min and x_max.
evaluate_log_raster x_min – number
x_max – number
point_count – number
auto_update – boolean
Evaluate the functions at point_count log-spaced points between x_min and x_max.
evaluate_over_grid x_min – number
x_max – number
point_count_x – number
y_min – number
y_max – number
point_count_y – number
Evaluate the functions over a grid of linearly-spaced points along the x- and y-axes.

Follow