bokeh.models.tickers¶
Models for computing good tick locations on different kinds of plots.
-
class
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, ...
-
base
¶ property type: base:Float
The multiplier to use for scaling mantissas.
-
mantissas
¶ property type: mantissas:Seq(Float)
The acceptable list numbers to generate multiples of.
-
max_interval
¶ property type: max_interval:Float
The largest allowable interval between two adjacent ticks.
Note
To specify an unbounded interval, set to
None
.
-
min_interval
¶ property type: min_interval:Float
The smallest allowable interval between two adjacent ticks.
-
-
class
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
CategoricalTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.Ticker
Generate ticks for categorical ranges.
-
class
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.-
tickers
¶ property type: tickers: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()
-
-
class
ContinuousTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.Ticker
A base class for non-categorical ticker types.
ContinuousTicker
is not generally useful to instantiate on its own.-
desired_num_ticks
¶ property type: desired_num_ticks:Int
A desired target number of major tick positions to generate across the plot range.
-
num_minor_ticks
¶ property type: num_minor_ticks:Int
The number of minor tick positions to generate between adjacent major tick values.
-
-
class
DatetimeTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.CompositeTicker
Generate nice ticks across different date and time scales.
-
class
DaysTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.SingleIntervalTicker
Generate ticks spaced apart by specific, even multiples of days.
-
days
¶ property type: days:Seq(Int)
The intervals of days to use.
-
-
class
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: ticks:Seq(Float)
List of tick locations.
-
-
class
LogTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.AdaptiveTicker
Generate ticks on a log scale.
-
class
MonthsTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.SingleIntervalTicker
Generate ticks spaced apart by specific, even multiples of months.
-
months
¶ property type: months:Seq(Int)
The intervals of months to use.
-
-
class
SingleIntervalTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.ContinuousTicker
Generate evenly spaced ticks at a fixed interval regardless of scale.
-
interval
¶ property type: interval:Float
The interval between adjacent ticks.
-
-
class
Ticker
(**kwargs)¶ Bases:
bokeh.model.Model
A base class for all ticker types.
Ticker
is not generally useful to instantiate on its own.
-
class
YearsTicker
(**kwargs)¶ Bases:
bokeh.models.tickers.SingleIntervalTicker
Generate ticks spaced apart even numbers of years.