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
andmantissas=[1, 2, 5]
, the ticker will generate the sequence:..., 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, 100, ...
-
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.
-
class
bokeh.models.tickers.
CategoricalTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.Ticker
Generate ticks for categorical ranges.
-
class
bokeh.models.tickers.
CompositeTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.ContinuousTicker
Combine different tickers at different scales.
Uses the
min_interval
andmax_interval
interval attributes of the tickers to select the appropriate ticker at different scales.
-
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.
-
class
bokeh.models.tickers.
DatetimeTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.CompositeTicker
Generate nice ticks across different date and time scales.
-
class
bokeh.models.tickers.
DaysTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.SingleIntervalTicker
Generate ticks spaced apart by specific, even multiples of days.
-
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.
-
class
bokeh.models.tickers.
LogTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.AdaptiveTicker
Generate ticks on a log scale.
-
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.
-
-
class
bokeh.models.tickers.
MonthsTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.SingleIntervalTicker
Generate ticks spaced apart by specific, even multiples of months.
-
class
bokeh.models.tickers.
SingleIntervalTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.ContinuousTicker
Generate evenly spaced ticks at a fixed interval regardless of scale.
-
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.
-
class
bokeh.models.tickers.
YearsTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.SingleIntervalTicker
Generate ticks spaced apart even numbers of years.