Models for computing good tick locations on different kinds of plots.
Ticker
Bases: bokeh.model.Model
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.
{ "id": "14406", "js_event_callbacks": {}, "js_property_callbacks": {}, "name": null, "subscribed_events": [], "tags": [] }
ContinuousTicker
Bases: bokeh.models.tickers.Ticker
bokeh.models.tickers.Ticker
A base class for non-categorical ticker types.
desired_num_ticks
property type: Int
Int
A desired target number of major tick positions to generate across the plot range.
num_minor_ticks
The number of minor tick positions to generate between adjacent major tick values.
{ "desired_num_ticks": 6, "id": "14407", "js_event_callbacks": {}, "js_property_callbacks": {}, "name": null, "num_minor_ticks": 5, "subscribed_events": [], "tags": [] }
FixedTicker
Bases: bokeh.models.tickers.ContinuousTicker
bokeh.models.tickers.ContinuousTicker
Generate ticks at fixed, explicitly supplied locations.
The desired_num_ticks property is ignored by this Ticker.
minor_ticks
property type: Seq ( Float )
Seq
Float
List of minor tick locations.
ticks
List of major tick locations.
{ "desired_num_ticks": 6, "id": "14410", "js_event_callbacks": {}, "js_property_callbacks": {}, "minor_ticks": [], "name": null, "num_minor_ticks": 5, "subscribed_events": [], "tags": [], "ticks": [] }
AdaptiveTicker
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:
base=10
mantissas=[1, 2, 5]
..., 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
The acceptable list numbers to generate multiples of.
max_interval
The largest allowable interval between two adjacent ticks.
To specify an unbounded interval, set to None.
None
min_interval
The smallest allowable interval between two adjacent ticks.
{ "base": 10.0, "desired_num_ticks": 6, "id": "14413", "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": [] }
CompositeTicker
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 ) )
Instance
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()
{ "desired_num_ticks": 6, "id": "14418", "js_event_callbacks": {}, "js_property_callbacks": {}, "name": null, "num_minor_ticks": 5, "subscribed_events": [], "tags": [], "tickers": [] }
SingleIntervalTicker
Generate evenly spaced ticks at a fixed interval regardless of scale.
interval
The interval between adjacent ticks.
{ "desired_num_ticks": 6, "id": "14420", "interval": null, "js_event_callbacks": {}, "js_property_callbacks": {}, "name": null, "num_minor_ticks": 5, "subscribed_events": [], "tags": [] }
DaysTicker
Bases: bokeh.models.tickers.SingleIntervalTicker
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.
{ "days": [], "desired_num_ticks": 6, "id": "14422", "interval": null, "js_event_callbacks": {}, "js_property_callbacks": {}, "name": null, "num_minor_ticks": 0, "subscribed_events": [], "tags": [] }
MonthsTicker
Generate ticks spaced apart by specific, even multiples of months.
months
The intervals of months to use.
{ "desired_num_ticks": 6, "id": "14424", "interval": null, "js_event_callbacks": {}, "js_property_callbacks": {}, "months": [], "name": null, "num_minor_ticks": 5, "subscribed_events": [], "tags": [] }
YearsTicker
Generate ticks spaced apart even numbers of years.
{ "desired_num_ticks": 6, "id": "14426", "interval": null, "js_event_callbacks": {}, "js_property_callbacks": {}, "name": null, "num_minor_ticks": 5, "subscribed_events": [], "tags": [] }
BasicTicker
Bases: bokeh.models.tickers.AdaptiveTicker
bokeh.models.tickers.AdaptiveTicker
Generate ticks on a linear scale.
This class may be renamed to LinearTicker in the future.
LinearTicker
{ "base": 10.0, "desired_num_ticks": 6, "id": "14427", "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": [] }
LogTicker
Generate ticks on a log scale.
{ "base": 10.0, "desired_num_ticks": 6, "id": "14428", "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": [] }
MercatorTicker
Bases: bokeh.models.tickers.BasicTicker
bokeh.models.tickers.BasicTicker
Generate nice lat/lon ticks form underlying WebMercator coordinates.
dimension
property type: Enum ( LatLon )
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”`.
"lon"
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.
{ "base": 10.0, "desired_num_ticks": 6, "dimension": null, "id": "14429", "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": [] }
CategoricalTicker
Generate ticks for categorical ranges.
{ "id": "14431", "js_event_callbacks": {}, "js_property_callbacks": {}, "name": null, "subscribed_events": [], "tags": [] }
DatetimeTicker
Bases: bokeh.models.tickers.CompositeTicker
bokeh.models.tickers.CompositeTicker
Generate nice ticks across different date and time scales.
{ "desired_num_ticks": 6, "id": "14432", "js_event_callbacks": {}, "js_property_callbacks": {}, "name": null, "num_minor_ticks": 0, "subscribed_events": [], "tags": [], "tickers": [ { "id": "14433", "type": "AdaptiveTicker" }, { "id": "14434", "type": "AdaptiveTicker" }, { "id": "14435", "type": "AdaptiveTicker" }, { "id": "14436", "type": "DaysTicker" }, { "id": "14437", "type": "DaysTicker" }, { "id": "14438", "type": "DaysTicker" }, { "id": "14439", "type": "DaysTicker" }, { "id": "14440", "type": "MonthsTicker" }, { "id": "14441", "type": "MonthsTicker" }, { "id": "14442", "type": "MonthsTicker" }, { "id": "14443", "type": "MonthsTicker" }, { "id": "14444", "type": "YearsTicker" } ] }