Anaconda Enterprise: Documentation

# bokeh.models.tickers

Models for computing good tick locations on different kinds of plots.

class `bokeh.models.tickers.``AdaptiveTicker`(**kwargs)

  Bases: `bokeh.models.tickers.ContinuousTicker`

  Generate “nice” round ticks at any magnitude.

  Creates ticks that are “base” multiples of a set of given mantissas. For example, with `base=10` and `mantissas=[1, 2, 5]`, the ticker will generate the sequence:

      ..., 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, 100, ...

  `base`

    property type: `Float`

    The multiplier to use for scaling mantissas.

  `mantissas`

    property type: `Seq` ( `Float` )

    The acceptable list numbers to generate multiples of.

  `max_interval`

    property type: `Float`

    The largest allowable interval between two adjacent ticks.

    Note

    To specify an unbounded interval, set to `None`.

  `min_interval`

    property type: `Float`

    The smallest allowable interval between two adjacent ticks.

JSON Prototype

    {
      "base": 10.0,
      "desired_num_ticks": 6,
      "id": "8087ccbf-b35f-41b4-9b94-f3564a3fa4a2",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "mantissas": [
        1,
        2,
        5
      ],
      "max_interval": null,
      "min_interval": 0.0,
      "name": null,
      "num_minor_ticks": 5,
      "subscribed_events": [],
      "tags": []
    }

class `bokeh.models.tickers.``BasicTicker`(**kwargs)

  Bases: `bokeh.models.tickers.AdaptiveTicker`

  Generate ticks on a linear scale.

  Note

  This class may be renamed to `LinearTicker` in the future.

JSON Prototype

    {
      "base": 10.0,
      "desired_num_ticks": 6,
      "id": "70302413-0203-4447-9ed5-483ce659893f",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "mantissas": [
        1,
        2,
        5
      ],
      "max_interval": null,
      "min_interval": 0.0,
      "name": null,
      "num_minor_ticks": 5,
      "subscribed_events": [],
      "tags": []
    }

class `bokeh.models.tickers.``CategoricalTicker`(**kwargs)

  Bases: `bokeh.models.tickers.Ticker`

  Generate ticks for categorical ranges.

JSON Prototype

    {
      "id": "51279c4b-3447-4835-ad34-fd3caec97f1d",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "subscribed_events": [],
      "tags": []
    }

class `bokeh.models.tickers.``CompositeTicker`(**kwargs)

  Bases: `bokeh.models.tickers.ContinuousTicker`

  Combine different tickers at different scales.

  Uses the `min_interval` and `max_interval` interval attributes of the tickers to select the appropriate ticker at different scales.

  `tickers`

    property type: `Seq` ( `Instance` ( `Ticker` ) )

    A list of Ticker objects to combine at different scales in order to generate tick values. The supplied tickers should be in order. Specifically, if S comes before T, then it should be the case that:

        S.get_max_interval() < T.get_min_interval()

JSON Prototype

    {
      "desired_num_ticks": 6,
      "id": "8fc5e076-7abd-48c4-be7b-773385d176f1",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "num_minor_ticks": 5,
      "subscribed_events": [],
      "tags": [],
      "tickers": []
    }

class `bokeh.models.tickers.``ContinuousTicker`(**kwargs)

  Bases: `bokeh.models.tickers.Ticker`

  A base class for non-categorical ticker types.

  Note

  This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.

  `desired_num_ticks`

    property type: `Int`

    A desired target number of major tick positions to generate across the plot range.

  `num_minor_ticks`

    property type: `Int`

    The number of minor tick positions to generate between adjacent major tick values.

JSON Prototype

    {
      "desired_num_ticks": 6,
      "id": "792a71ee-cf4b-4c29-ae7d-b47ab680fbb9",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "num_minor_ticks": 5,
      "subscribed_events": [],
      "tags": []
    }

class `bokeh.models.tickers.``DatetimeTicker`(**kwargs)

  Bases: `bokeh.models.tickers.CompositeTicker`

  Generate nice ticks across different date and time scales.

JSON Prototype

    {
      "desired_num_ticks": 6,
      "id": "01738049-ad5a-4f8b-9bec-8ec8f9f8e064",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "num_minor_ticks": 0,
      "subscribed_events": [],
      "tags": [],
      "tickers": [
        {
          "id": "c8562de8-3be5-4d3c-b57e-d0fb3d6aeba4",
          "type": "AdaptiveTicker"
        },
        {
          "id": "e9ad3271-802f-488d-b06a-c757230883fe",
          "type": "AdaptiveTicker"
        },
        {
          "id": "013b3a7a-da7f-4a6d-8bf8-6a88b2167dc7",
          "type": "AdaptiveTicker"
        },
        {
          "id": "dec3d7eb-2e27-42cc-9d14-0a01e5def058",
          "type": "DaysTicker"
        },
        {
          "id": "bb926ed8-01d0-4767-9f50-7576971ffc80",
          "type": "DaysTicker"
        },
        {
          "id": "88790f1c-d44d-4238-a582-b0ae26242fc1",
          "type": "DaysTicker"
        },
        {
          "id": "fb0071c9-c2ab-4aab-8820-d123d4dd4938",
          "type": "DaysTicker"
        },
        {
          "id": "9bc48331-fdea-4f0b-a9d5-c05f01889cbd",
          "type": "MonthsTicker"
        },
        {
          "id": "3c4fdb03-f727-4e01-ad46-4efa958b33aa",
          "type": "MonthsTicker"
        },
        {
          "id": "928bf408-d1da-4a78-a7d7-fef84f266f1c",
          "type": "MonthsTicker"
        },
        {
          "id": "152c93f7-d28d-4655-b987-011b4f80f505",
          "type": "MonthsTicker"
        },
        {
          "id": "9c656108-68b9-4f50-a2f7-7f121655a9f4",
          "type": "YearsTicker"
        }
      ]
    }

class `bokeh.models.tickers.``DaysTicker`(**kwargs)

  Bases: `bokeh.models.tickers.SingleIntervalTicker`

  Generate ticks spaced apart by specific, even multiples of days.

  `days`

    property type: `Seq` ( `Int` )

    The intervals of days to use.

JSON Prototype

    {
      "days": [],
      "desired_num_ticks": 6,
      "id": "8583ffe4-a219-4a01-99ab-d53551e4e995",
      "interval": null,
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "num_minor_ticks": 5,
      "subscribed_events": [],
      "tags": []
    }

class `bokeh.models.tickers.``FixedTicker`(**kwargs)

  Bases: `bokeh.models.tickers.ContinuousTicker`

  Generate ticks at fixed, explicitly supplied locations.

  Note

  The `desired_num_ticks` property is ignored by this Ticker.

  `ticks`

    property type: `Seq` ( `Float` )

    List of tick locations.

JSON Prototype

    {
      "desired_num_ticks": 6,
      "id": "3cf58df7-468a-4469-b869-5e87c7301c41",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "num_minor_ticks": 5,
      "subscribed_events": [],
      "tags": [],
      "ticks": []
    }

class `bokeh.models.tickers.``LogTicker`(**kwargs)

  Bases: `bokeh.models.tickers.AdaptiveTicker`

  Generate ticks on a log scale.

JSON Prototype

    {
      "base": 10.0,
      "desired_num_ticks": 6,
      "id": "df070ae7-91ea-4f8c-b182-cb26030257b6",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "mantissas": [
        1,
        5
      ],
      "max_interval": null,
      "min_interval": 0.0,
      "name": null,
      "num_minor_ticks": 5,
      "subscribed_events": [],
      "tags": []
    }

class `bokeh.models.tickers.``MercatorTicker`(**kwargs)

  Bases: `bokeh.models.tickers.BasicTicker`

  Generate nice lat/lon ticks form underlying WebMercator coordinates.

  `dimension`

    property type: `Enum` ( `LatLon` )

    Specify whether to generate ticks for Latitude or Longitude.

    Projected coordinates are not separable, computing Latitude and Longitude tick locations from Web Mercator requires considering coordinates from both dimensions together. Use this property to specify which result should be returned.

    Typically, if the ticker is for an x-axis, then dimension should be `"lon"` and if the ticker is for a y-axis, then the dimension should be “lat”`.

    In order to prevent hard to debug errors, there is no default value for dimension. Using an un-configured MercatorTicker will result in a validation error and a JavaScript console error.

JSON Prototype

    {
      "base": 10.0,
      "desired_num_ticks": 6,
      "dimension": null,
      "id": "f109c5d0-2ee2-4e32-8a40-c0d34bc2141d",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "mantissas": [
        1,
        2,
        5
      ],
      "max_interval": null,
      "min_interval": 0.0,
      "name": null,
      "num_minor_ticks": 5,
      "subscribed_events": [],
      "tags": []
    }

class `bokeh.models.tickers.``MonthsTicker`(**kwargs)

  Bases: `bokeh.models.tickers.SingleIntervalTicker`

  Generate ticks spaced apart by specific, even multiples of months.

  `months`

    property type: `Seq` ( `Int` )

    The intervals of months to use.

JSON Prototype

    {
      "desired_num_ticks": 6,
      "id": "37835cc2-f626-411a-a755-37c4630b02c2",
      "interval": null,
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "months": [],
      "name": null,
      "num_minor_ticks": 5,
      "subscribed_events": [],
      "tags": []
    }

class `bokeh.models.tickers.``SingleIntervalTicker`(**kwargs)

  Bases: `bokeh.models.tickers.ContinuousTicker`

  Generate evenly spaced ticks at a fixed interval regardless of scale.

  `interval`

    property type: `Float`

    The interval between adjacent ticks.

JSON Prototype

    {
      "desired_num_ticks": 6,
      "id": "fc58b5fa-fa37-47ed-bc82-11c0f7fe9d9d",
      "interval": null,
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "num_minor_ticks": 5,
      "subscribed_events": [],
      "tags": []
    }

class `bokeh.models.tickers.``Ticker`(**kwargs)

  Bases: `bokeh.model.Model`

  A base class for all ticker types.

  Note

  This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.

JSON Prototype

    {
      "id": "f4b34016-f908-4b54-ba98-1dda4406346a",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "subscribed_events": [],
      "tags": []
    }

class `bokeh.models.tickers.``YearsTicker`(**kwargs)

  Bases: `bokeh.models.tickers.SingleIntervalTicker`

  Generate ticks spaced apart even numbers of years.

JSON Prototype

    {
      "desired_num_ticks": 6,
      "id": "4f0dfe7c-8f17-400d-9a63-a18e1a908ccd",
      "interval": null,
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "num_minor_ticks": 5,
      "subscribed_events": [],
      "tags": []
    }