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": "0a913afc-0a23-4319-aae5-27c9c79381ea",
      "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": "d54a4305-123d-4ac5-b622-9c69b53c4e60",
      "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": "3f2a9190-555f-4d4c-bc1e-d1d13e954b67",
      "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": "15b6b3eb-1a23-4bc7-9bde-ca4e83aad762",
      "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": "985e0e17-1a06-4808-b7d5-009eebf228fa",
      "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": "c3e0b0a2-f2b3-493a-82a4-8c41ff6e96a4",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "num_minor_ticks": 0,
      "subscribed_events": [],
      "tags": [],
      "tickers": [
        {
          "id": "5642e916-f6fe-431a-a061-c7f1cec92be2",
          "type": "AdaptiveTicker"
        },
        {
          "id": "32064aeb-3c5c-4b50-bd9d-8f234718264e",
          "type": "AdaptiveTicker"
        },
        {
          "id": "d5653a39-15f5-4926-8161-73a208340b3c",
          "type": "AdaptiveTicker"
        },
        {
          "id": "c0a5d35b-ab78-4cb4-87b7-5971c711a878",
          "type": "DaysTicker"
        },
        {
          "id": "4b75bd43-9818-4455-a849-cfd6f09a68b0",
          "type": "DaysTicker"
        },
        {
          "id": "21de6d54-d4ec-4c6b-8088-0302d0aedd5a",
          "type": "DaysTicker"
        },
        {
          "id": "c751dbde-d992-4b8a-ae4b-9173a663ba11",
          "type": "DaysTicker"
        },
        {
          "id": "9b804d8a-f48a-4d28-b3a8-0d1bc477fa63",
          "type": "MonthsTicker"
        },
        {
          "id": "3e54afc9-7053-4062-8da2-a5b87114dc5e",
          "type": "MonthsTicker"
        },
        {
          "id": "aac6e439-812b-4bbc-a1c8-6b6da07aca5d",
          "type": "MonthsTicker"
        },
        {
          "id": "61682cd0-d06a-40f2-bb15-211bd827f803",
          "type": "MonthsTicker"
        },
        {
          "id": "9cc9d3fc-549c-41c1-955e-96347a3cfe45",
          "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": "ba26a2fc-6863-467a-9f44-f6e966e5c0cb",
      "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": "8ce562f4-4c40-4d2a-9719-781c9e4588c7",
      "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": "6e522ad1-d2c1-4f98-9d4f-7a2904fa71a5",
      "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": "b8bc9d33-2518-4244-aa6f-d1ced9c926e6",
      "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": "e028d933-6a34-4cbc-a8ae-c8a663bf9aa2",
      "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": "fc05d8a0-e1bb-47fa-a187-983cbca876d0",
      "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": "06af8625-95dd-4505-9e9d-46cfc0d52688",
      "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": "f6fa5d85-3389-4bed-91bb-b6cdd77a8d96",
      "interval": null,
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "num_minor_ticks": 5,
      "subscribed_events": [],
      "tags": []
    }