bokeh.models.tickers
¶Models for computing good tick locations on different kinds of plots.
AdaptiveTicker
(**kwargs)¶Bases: bokeh.models.tickers.Ticker
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, ...
[
{
"attributes": {
"base": 10.0,
"desired_num_ticks": 6,
"doc": null,
"id": "f436c4cd-d341-4c08-b3c3-49a1ca2e769d",
"mantissas": [
2,
5,
10
],
"max_interval": 100.0,
"min_interval": 0.0,
"name": null,
"num_minor_ticks": 5,
"tags": []
},
"id": "f436c4cd-d341-4c08-b3c3-49a1ca2e769d",
"type": "AdaptiveTicker"
}
]
BasicTicker
(**kwargs)¶Bases: bokeh.models.tickers.AdaptiveTicker
Generate ticks on a linear scale.
Note
This class may be renamed to LinearTicker
in the future.
[
{
"attributes": {
"base": 10.0,
"desired_num_ticks": 6,
"doc": null,
"id": "2a0938be-2829-41dc-bb53-c7a8b1ae1a7e",
"mantissas": [
2,
5,
10
],
"max_interval": 100.0,
"min_interval": 0.0,
"name": null,
"num_minor_ticks": 5,
"tags": []
},
"id": "2a0938be-2829-41dc-bb53-c7a8b1ae1a7e",
"type": "BasicTicker"
}
]
CategoricalTicker
(**kwargs)¶Bases: bokeh.models.tickers.Ticker
Generate ticks for categorical ranges.
[
{
"attributes": {
"desired_num_ticks": 6,
"doc": null,
"id": "979c9ad0-ba98-49b5-bb80-157ffa2d4237",
"name": null,
"num_minor_ticks": 5,
"tags": []
},
"id": "979c9ad0-ba98-49b5-bb80-157ffa2d4237",
"type": "CategoricalTicker"
}
]
CompositeTicker
(**kwargs)¶Bases: bokeh.models.tickers.Ticker
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.
[
{
"attributes": {
"desired_num_ticks": 6,
"doc": null,
"id": "acac5bfe-122d-4cff-aa46-9d145a41e436",
"name": null,
"num_minor_ticks": 5,
"tags": [],
"tickers": null
},
"id": "acac5bfe-122d-4cff-aa46-9d145a41e436",
"type": "CompositeTicker"
}
]
DatetimeTicker
(**kwargs)¶Bases: bokeh.models.tickers.Ticker
Generate nice ticks across different date and time scales.
[
{
"attributes": {
"desired_num_ticks": 6,
"doc": null,
"id": "dd9b0816-1661-4caa-a3da-fd01115d2688",
"name": null,
"num_minor_ticks": 5,
"tags": []
},
"id": "dd9b0816-1661-4caa-a3da-fd01115d2688",
"type": "DatetimeTicker"
}
]
DaysTicker
(**kwargs)¶Bases: bokeh.models.tickers.SingleIntervalTicker
Generate ticks spaced apart by specific, even multiples of days.
[
{
"attributes": {
"days": null,
"desired_num_ticks": 6,
"doc": null,
"id": "eab3146b-e982-4264-994e-93f66a8d97a3",
"interval": null,
"name": null,
"num_minor_ticks": 5,
"tags": []
},
"id": "eab3146b-e982-4264-994e-93f66a8d97a3",
"type": "DaysTicker"
}
]
FixedTicker
(**kwargs)¶Bases: bokeh.models.tickers.Ticker
Generate ticks at fixed, explicitly supplied locations.
Note
The desired_num_ticks
property is ignored by this Ticker.
[
{
"attributes": {
"desired_num_ticks": 6,
"doc": null,
"id": "3c185782-22c5-4b89-abca-aa113f6611bf",
"name": null,
"num_minor_ticks": 5,
"tags": [],
"ticks": null
},
"id": "3c185782-22c5-4b89-abca-aa113f6611bf",
"type": "FixedTicker"
}
]
LogTicker
(**kwargs)¶Bases: bokeh.models.tickers.AdaptiveTicker
Generate ticks on a log scale.
[
{
"attributes": {
"base": 10.0,
"desired_num_ticks": 6,
"doc": null,
"id": "3184e4cd-3129-4d03-9d3a-2db125ab0626",
"mantissas": [
2,
5,
10
],
"max_interval": 100.0,
"min_interval": 0.0,
"name": null,
"num_minor_ticks": 5,
"tags": []
},
"id": "3184e4cd-3129-4d03-9d3a-2db125ab0626",
"type": "LogTicker"
}
]
MonthsTicker
(**kwargs)¶Bases: bokeh.models.tickers.SingleIntervalTicker
Generate ticks spaced apart by specific, even multiples of months.
[
{
"attributes": {
"desired_num_ticks": 6,
"doc": null,
"id": "aa9115c6-485a-4b0c-99ce-e180dfcee653",
"interval": null,
"months": null,
"name": null,
"num_minor_ticks": 5,
"tags": []
},
"id": "aa9115c6-485a-4b0c-99ce-e180dfcee653",
"type": "MonthsTicker"
}
]
SingleIntervalTicker
(**kwargs)¶Bases: bokeh.models.tickers.Ticker
Generate evenly spaced ticks at a fixed interval regardless of scale.
[
{
"attributes": {
"desired_num_ticks": 6,
"doc": null,
"id": "f093a4d9-b39e-45cf-af7c-f942d387dcad",
"interval": null,
"name": null,
"num_minor_ticks": 5,
"tags": []
},
"id": "f093a4d9-b39e-45cf-af7c-f942d387dcad",
"type": "SingleIntervalTicker"
}
]
Ticker
(**kwargs)¶Bases: bokeh.plot_object.PlotObject
A base class for all ticker types. Ticker
is
not generally useful to instantiate on its own.
[
{
"attributes": {
"desired_num_ticks": 6,
"doc": null,
"id": "0c0ed6ef-9af2-4362-969a-49c1a3000261",
"name": null,
"num_minor_ticks": 5,
"tags": []
},
"id": "0c0ed6ef-9af2-4362-969a-49c1a3000261",
"type": "Ticker"
}
]
YearsTicker
(**kwargs)¶Bases: bokeh.models.tickers.SingleIntervalTicker
Generate ticks spaced apart even numbers of years.
[
{
"attributes": {
"desired_num_ticks": 6,
"doc": null,
"id": "ef5fb01e-5a03-46b3-900b-15e7be1c4900",
"interval": null,
"name": null,
"num_minor_ticks": 5,
"tags": []
},
"id": "ef5fb01e-5a03-46b3-900b-15e7be1c4900",
"type": "YearsTicker"
}
]