Source code for bokeh.models.scales

'''

'''
from __future__ import absolute_import

from ..core.has_props import abstract
from .transforms import Transform

@abstract
[docs]class Scale(Transform): ''' Base class for ``Scale`` models that represent an invertible computation to be carried out on the client-side. JavaScript implementations should implement the following methods: .. code-block: coffeescript compute: (x) -> # compute the transform of a single value v_compute: (xs) -> # compute the transform of an array of values invert: (xprime) -> # compute the inverse transform of a single value v_invert: (xprimes) -> # compute the inverse transform of an array of values ''' pass
[docs]class LinearScale(Scale): ''' ''' pass
[docs]class LogScale(Scale): ''' ''' pass
[docs]class CategoricalScale(LinearScale): ''' ''' pass