Xplot

This library provides functions to perform plotting and generation of various 2D charts

StatusName
Generate.ids ( Table ↑Table, Function ↑write_ID )

Writes 1 to size of table to the selected column. Useful for generating IDs for an output table.

Generate.linear ( Table ↑Table, Function ↑write_Field, Number min_value, Number max_value, Number num_steps )

Outputs a linear range of numbers based on min value, max value and desired result size, to an output table column

Generate.linear_array ( Array ↑array, Number min_value, Number max_value, Number num_steps )

Outputs a linear range of numbers based on min value, max value and desired result size, to an output array

Number Generate.linearInterval ( Table ↑Table, Function ↑write_Field, Number min_value, Number max_value, Number interval )

Outputs a linear range of numbers based on min value, max value and desired interval, to an output table column

Number Generate.linearInterval_array ( Array ↑array, Number min_value, Number max_value, Number interval )

Outputs a linear range of numbers based on min value, max value and desired interval, to an output array

Generate.log ( Table ↑Table, Function ↑write_Field, Number min_value, Number max_value, Number num_steps )

Outputs a logarithmic range of numbers based on min value, max value and desired result size, to an output table column

Generate.log_array ( Array ↑array, Number min_value, Number max_value, Number num_steps )

Outputs a logarithmic range of numbers based on min value, max value and desired result size, to an output array

Number Generate.logInterval ( Table ↑Table, Function ↑write_Field, Number min_value, Number max_value, Number interval )

Outputs a logarithmic range of numbers based on min value, max value and desired interval, to an output table column

Number Generate.logInterval_array ( Array ↑array, Number min_value, Number max_value, Number interval )

Outputs a logarithmic range of numbers based on min value, max value and desired interval, to an output array

Generate.values ( Table ↑Table, Function ↑write_FieldY, Object ↓f, Table ↓Table, Function ↓read_FieldX )

Computes the output of a function f(x) based on a Table's input field (read_FieldX), to an output field (write_FieldY).

Generate.values_array ( Array ↑y_array, Object ↓f, Number ↓x_size, Array ↓x_array )

Computes the output of a function f(x) based on an input array range (x_array) of size (x_size), to an output array (y_array)

Function Scale.createInvLogScaler ( Number ↓minX, Number ↓maxX, Number ↓minY, Number ↓maxY )

Creates a function for inverse log scaling values from minX..maxX to minY..maxY. It uses the part of the log curve from 2..98.

Function Scale.createLinearScaler ( Number ↓minX, Number ↓maxX, Number ↓minY, Number ↓maxY )

Creates a function for linearly scaling values from minX..maxX to minY..maxY

Function Scale.createLogScaler ( Number ↓minX, Number ↓maxX, Number ↓minY, Number ↓maxY )

Creates a function for log scaling values from minX..maxX to minY..maxY. It uses the part of the log curve from 2..98.

Transform.convolve ( Table ⇅Table, Function ↓read_Value, Function ↑write_Value, Vector ↓convolve_vec, Number ↓convolve_vec_size )

Processes values in this table by convolution.

At the start and end of the table, where there are insufficient values to compute the convolved value, the output value is left blank.

Number Transform.convolve_array ( Array ↑values, Vector ↓convolve_vec, Number ↓convolve_vec_size, Array ↓values, Number ↓values_length )

Processes values in an input array by convolution and returns it in another array.

At the start and end of the array, where there are insufficient values to compute the convolved value, output for those values are omitted.

Transform.convolveMirror ( Table ⇅Table, Function ↓read_Value, Function ↑write_Value, Vector ↓convolve_vec, Number ↓convolve_vec_size )

Processes values in this table by convolution.

At the start and end of the table, where there are insufficient values to compute the convolved value, input data is mirrored to fill in the missing input values.

Number Transform.convolveMirror_array ( Array ↑values, Vector ↓convolve_vec, Number ↓convolve_vec_size, Array ↓values, Number ↓values_length )

Processes values in an input array by convolution and returns it in another array.

At the start and end of the array, where there are insufficient values to compute the convolved value, input data is mirrored to fill in the missing input values.


Category: Generate

Functions for generation of values

Lib.Generate.ids ( ↑Table, ↑write_ID )

Writes 1 to size of table to the selected column. Useful for generating IDs for an output table.

Parameters:
Lib.Generate.linear ( ↑Table, ↑write_Field, min_value, max_value, num_steps )

Outputs a linear range of numbers based on min value, max value and desired result size, to an output table column

Parameters:
Lib.Generate.linear_array ( ↑array, min_value, max_value, num_steps )

Outputs a linear range of numbers based on min value, max value and desired result size, to an output array

Parameters:
numOutput = Lib.Generate.linearInterval ( ↑Table, ↑write_Field, min_value, max_value, interval )

Outputs a linear range of numbers based on min value, max value and desired interval, to an output table column

Parameters: Returns: Number numOutput - number of numbers generated
numOutput = Lib.Generate.linearInterval_array ( ↑array, min_value, max_value, interval )

Outputs a linear range of numbers based on min value, max value and desired interval, to an output array

Parameters: Returns: Number numOutput - number of numbers generated
Lib.Generate.log ( ↑Table, ↑write_Field, min_value, max_value, num_steps )

Outputs a logarithmic range of numbers based on min value, max value and desired result size, to an output table column

Parameters:
Lib.Generate.log_array ( ↑array, min_value, max_value, num_steps )

Outputs a logarithmic range of numbers based on min value, max value and desired result size, to an output array

Parameters:
numOutput = Lib.Generate.logInterval ( ↑Table, ↑write_Field, min_value, max_value, interval )

Outputs a logarithmic range of numbers based on min value, max value and desired interval, to an output table column

Parameters: Returns: Number numOutput - number of numbers generated
numOutput = Lib.Generate.logInterval_array ( ↑array, min_value, max_value, interval )

Outputs a logarithmic range of numbers based on min value, max value and desired interval, to an output array

Parameters: Returns: Number numOutput - number of numbers generated
Lib.Generate.values ( ↑Table, ↑write_FieldY, ↓f, ↓Table, ↓read_FieldX )

Computes the output of a function f(x) based on a Table's input field (read_FieldX), to an output field (write_FieldY).

Parameters:
  • Table ↑Table
  • Function ↑write_FieldY
  • Object ↓f - may be a normal JS function that takes in a single input number, or a data object from Xfit library
  • Table ↓Table
  • Function ↓read_FieldX
Lib.Generate.values_array ( ↑y_array, ↓f, ↓x_size, ↓x_array )

Computes the output of a function f(x) based on an input array range (x_array) of size (x_size), to an output array (y_array)

Parameters:
  • Array ↑y_array - output array
  • Object ↓f - may be a normal JS function that takes in a single input number, or a data object from Xfit library
  • Number ↓x_size - the size of the input array
  • Array ↓x_array - input array

Category: Scale

Functions for scaling values

↑func = Lib.Scale.createInvLogScaler ( ↓minX, ↓maxX, ↓minY, ↓maxY )

Creates a function for inverse log scaling values from minX..maxX to minY..maxY. It uses the part of the log curve from 2..98.

Parameters:
  • Number ↓minX - - minimum x. Any input x below this value is set to this value.
  • Number ↓maxX - - maximum x. Any input x above this value is set to this value. maxX must always >= minX
  • Number ↓minY - - minimum y. The scaled value returned corresponding to minX.
  • Number ↓maxY - - maximum y. The scaled value returned corresponding to maxX. Note minY may be larger than maxY, in the case of an inverse scaling.
Returns: Function ↑func - - y = f(x), where y is the inverse log scaled value of x.
↑func = Lib.Scale.createLinearScaler ( ↓minX, ↓maxX, ↓minY, ↓maxY )

Creates a function for linearly scaling values from minX..maxX to minY..maxY

Parameters:
  • Number ↓minX - - minimum x. Any input x below this value is set to this value.
  • Number ↓maxX - - maximum x. Any input x above this value is set to this value. maxX must always >= minX
  • Number ↓minY - - minimum y. The scaled value returned corresponding to minX.
  • Number ↓maxY - - maximum y. The scaled value returned corresponding to maxX. Note minY may be larger than maxY, in the case of an inverse scaling.
Returns: Function ↑func - - y = f(x), where y is the linearly scaled value of x.
↑func = Lib.Scale.createLogScaler ( ↓minX, ↓maxX, ↓minY, ↓maxY )

Creates a function for log scaling values from minX..maxX to minY..maxY. It uses the part of the log curve from 2..98.

Parameters:
  • Number ↓minX - - minimum x. Any input x below this value is set to this value.
  • Number ↓maxX - - maximum x. Any input x above this value is set to this value. maxX must always >= minX
  • Number ↓minY - - minimum y. The scaled value returned corresponding to minX.
  • Number ↓maxY - - maximum y. The scaled value returned corresponding to maxX. Note minY may be larger than maxY, in the case of an inverse scaling.
Returns: Function ↑func - - y = f(x), where y is the log scaled value of x.

Category: Transform

Functions for transforming values

Lib.Transform.convolve ( ⇅Table, ↓read_Value, ↑write_Value, ↓convolve_vec, ↓convolve_vec_size )

Processes values in this table by convolution.

At the start and end of the table, where there are insufficient values to compute the convolved value, the output value is left blank.

Parameters:
  • Table ⇅Table - - Table containing the input values and has the field to write the convolved value to.
  • Function ↓read_Value - - read function for the input values.
  • Function ↑write_Value - - write function for the convolved values.
  • Vector ↓convolve_vec - - coefficients of the convolution vector.
  • Number ↓convolve_vec_size - - size of the convolution vector specified above. This must be a positive odd integer.
↑values_length = Lib.Transform.convolve_array ( ↑values, ↓convolve_vec, ↓convolve_vec_size, ↓values, ↓values_length )

Processes values in an input array by convolution and returns it in another array.

At the start and end of the array, where there are insufficient values to compute the convolved value, output for those values are omitted.

Parameters:
  • Array ↑values - - output array.
  • Vector ↓convolve_vec - - coefficients of the convolution vector.
  • Number ↓convolve_vec_size - - size of the convolution vector specified above.
  • Array ↓values - - input values array.
  • Number ↓values_length - - size of input values array.
Returns: Number ↑values_length - - number of elements in output array.
Lib.Transform.convolveMirror ( ⇅Table, ↓read_Value, ↑write_Value, ↓convolve_vec, ↓convolve_vec_size )

Processes values in this table by convolution.

At the start and end of the table, where there are insufficient values to compute the convolved value, input data is mirrored to fill in the missing input values.

Parameters:
  • Table ⇅Table - - Table containing the input values and has the field to write the convolved value to.
  • Function ↓read_Value - - read function for the input values.
  • Function ↑write_Value - - write function for the convolved values.
  • Vector ↓convolve_vec - - coefficients of the convolution vector.
  • Number ↓convolve_vec_size - - size of the convolution vector specified above. This must be a positive odd integer.
↑values_length = Lib.Transform.convolveMirror_array ( ↑values, ↓convolve_vec, ↓convolve_vec_size, ↓values, ↓values_length )

Processes values in an input array by convolution and returns it in another array.

At the start and end of the array, where there are insufficient values to compute the convolved value, input data is mirrored to fill in the missing input values.

Parameters:
  • Array ↑values - - output array.
  • Vector ↓convolve_vec - - coefficients of the convolution vector.
  • Number ↓convolve_vec_size - - size of the convolution vector specified above. This must be a positive odd integer.
  • Array ↓values - - input values array.
  • Number ↓values_length - - size of input values array.
Returns: Number ↑values_length - - number of elements in output array.