bokeh.models.transforms

class Interpolator(**kwargs)[source]

Bases: bokeh.models.transforms.Transform

Base class for interpolator transforms.

Interpolators return the value of a function which has been evaluated between specified (x, y) pairs of data. As an example, if two control point pairs were provided to the interpolator, a linear interpolaction at a specific value of ‘x’ would result in the value of ‘y’ which existed on the line conneting the two control points.

The control point pairs for the interpolators can be specified through either

  • A literal sequence of values:
  • or a pair of columns defined in a ColumnDataSource object:

This is the base class and is not intended to end use. Please see the documentation for the final derived classes (Jitter, LineraInterpolator, StepInterpolator) for mor information on their specific methods of interpolation.

clip

property type: Bool

Determine if the interpolation should clip the result to include only values inside its predefined range. If this is set to False, it will return the most value of the closest point.

data

property type: Instance ( ColumnarDataSource )

Data which defines the source for the named columns if a string is passed to either the x or y parameters.

x

property type: Either ( String , Seq ( Float ) )

Independant coordiante denoting the location of a point.

y

property type: Either ( String , Seq ( Float ) )

Dependant coordinate denoting the value of a point at a location.

JSON Prototype
{
  "clip": true,
  "data": null,
  "id": "bab0aef5-5ed8-4772-800b-aafc80e12ff8",
  "js_callbacks": {},
  "name": null,
  "tags": [],
  "x": null,
  "y": null
}
class Jitter(**kwargs)[source]

Bases: bokeh.models.transforms.Transform

Apply either a uniform or normally sampled random jitter to data.

distribution

property type: Enum ( JitterRandomDistribution )

The random distribution upon which to pull the random scatter

mean

property type: Float

The central value for the random sample

width

property type: Float

The width (absolute for uniform distribution and sigma for the normal distribution) of the random sample.

JSON Prototype
{
  "distribution": "uniform",
  "id": "376172ce-dcad-42b1-b587-3192cecfc4dd",
  "js_callbacks": {},
  "mean": 0,
  "name": null,
  "tags": [],
  "width": 1
}
class LinearInterpolator(**kwargs)[source]

Bases: bokeh.models.transforms.Interpolator

Compute a linear interpolation between the control points provided throught the x, y, and data parameters.

JSON Prototype
{
  "clip": true,
  "data": null,
  "id": "a0c2702b-3f98-4cb2-a4e6-3b686f6f2a2a",
  "js_callbacks": {},
  "name": null,
  "tags": [],
  "x": null,
  "y": null
}
class StepInterpolator(**kwargs)[source]

Bases: bokeh.models.transforms.Interpolator

Compute a step-wise interpolation between the points provided throught the x, y, and data parameters.

mode

property type: Enum ( StepMode )

Adjust the behavior of the returned value in relation to the control points. The parameter can assume one of three values:

  • after (default): Assume the y-value associated with the nearest x-value which is less than or equal to the point to transform.
  • before: Assume the y-value associated with the nearest x-value which is greater than the point to transform.
  • center: Assume the y-value associated with the nearest x-value to the point to transform.
JSON Prototype
{
  "clip": true,
  "data": null,
  "id": "92e49f79-6b90-48d1-ba9b-748d71044115",
  "js_callbacks": {},
  "mode": "after",
  "name": null,
  "tags": [],
  "x": null,
  "y": null
}
class Transform(**kwargs)[source]

Bases: bokeh.model.Model

Base class for Transform models that represent a computation to be carried out on the client-side.

JavaScript implementations should implement the following methods:

JSON Prototype
{
  "id": "8ba2b586-4ca1-45d5-9568-d8505c3a0b42",
  "js_callbacks": {},
  "name": null,
  "tags": []
}