Guide renderers for various kinds of axes that can be added to Bokeh plots
Axis
Bases: bokeh.models.renderers.GuideRenderer
bokeh.models.renderers.GuideRenderer
A base class that defines common properties for all axis 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.
axis_label
property type: String
String
A text label for the axis, displayed parallel to the axis rule.
LaTeX notation is not currently supported; please see #647 to track progress or contribute.
axis_label_standoff
property type: Int
Int
The distance in pixels that the axis labels should be offset from the tick labels.
axis_label_text_align
property type: Enum ( TextAlign )
Enum
TextAlign
The text align of the axis label.
axis_label_text_alpha
property type: NumberSpec
NumberSpec
The text alpha of the axis label.
axis_label_text_baseline
property type: Enum ( TextBaseline )
TextBaseline
The text baseline of the axis label.
axis_label_text_color
property type: ColorSpec
ColorSpec
The text color of the axis label.
axis_label_text_font
The text font of the axis label.
axis_label_text_font_size
property type: FontSizeSpec
FontSizeSpec
The text font size of the axis label.
axis_label_text_font_style
property type: Enum ( FontStyle )
FontStyle
The text font style of the axis label.
axis_label_text_line_height
property type: Float
Float
The text line height of the axis label.
axis_line_alpha
The line alpha of the axis line.
axis_line_cap
property type: Enum ( LineCap )
LineCap
The line cap of the axis line.
axis_line_color
The line color of the axis line.
axis_line_dash
property type: DashPattern
DashPattern
The line dash of the axis line.
axis_line_dash_offset
The line dash offset of the axis line.
axis_line_join
property type: Enum ( LineJoin )
LineJoin
The line join of the axis line.
axis_line_width
The line width of the axis line.
bounds
property type: Either ( Auto , Tuple ( Float , Float ), Tuple ( Datetime , Datetime ) )
Either
Auto
Tuple
Datetime
Bounds for the rendered axis. If unset, the axis will span the entire plot in the given dimension.
fixed_location
property type: Either ( Float , String , Tuple ( String , String ), Tuple ( String , String , String ) )
Set to specify a fixed coordinate location to draw the axis. The direction of ticks and major labels is determined by the side panel that the axis belongs to.
Axes labels are suppressed when axes are positioned at fixed locations inside the central plot area.
formatter
property type: Instance ( TickFormatter )
Instance
TickFormatter
A TickFormatter to use for formatting the visual appearance of ticks.
major_label_orientation
property type: Either ( Enum ( Enumeration(horizontal, vertical) ), Float )
What direction the major label text should be oriented. If a number is supplied, the angle of the text is measured from horizontal.
major_label_overrides
property type: Dict ( Either ( Float , String ), String )
Dict
Provide explicit tick label values for specific tick locations that override normal formatting.
major_label_standoff
The distance in pixels that the major tick labels should be offset from the associated ticks.
major_label_text_align
The text align of the major tick labels.
major_label_text_alpha
The text alpha of the major tick labels.
major_label_text_baseline
The text baseline of the major tick labels.
major_label_text_color
The text color of the major tick labels.
major_label_text_font
The text font of the major tick labels.
major_label_text_font_size
The text font size of the major tick labels.
major_label_text_font_style
The text font style of the major tick labels.
major_label_text_line_height
The text line height of the major tick labels.
major_tick_in
The distance in pixels that major ticks should extend into the main plot area.
major_tick_line_alpha
The line alpha of the major ticks.
major_tick_line_cap
The line cap of the major ticks.
major_tick_line_color
The line color of the major ticks.
major_tick_line_dash
The line dash of the major ticks.
major_tick_line_dash_offset
The line dash offset of the major ticks.
major_tick_line_join
The line join of the major ticks.
major_tick_line_width
The line width of the major ticks.
major_tick_out
The distance in pixels that major ticks should extend out of the main plot area.
minor_tick_in
The distance in pixels that minor ticks should extend into the main plot area.
minor_tick_line_alpha
The line alpha of the minor ticks.
minor_tick_line_cap
The line cap of the minor ticks.
minor_tick_line_color
The line color of the minor ticks.
minor_tick_line_dash
The line dash of the minor ticks.
minor_tick_line_dash_offset
The line dash offset of the minor ticks.
minor_tick_line_join
The line join of the minor ticks.
minor_tick_line_width
The line width of the minor ticks.
minor_tick_out
ticker
property type: Instance ( Ticker )
Ticker
A Ticker to use for computing locations of axis components.
The property may also be passed a sequence of floating point numbers as a shorthand for creating and configuring a FixedTicker, e.g. the following code
FixedTicker
from bokeh.plotting import figure p = figure() p.xaxis.ticker = [10, 20, 37.4]
is equivalent to:
from bokeh.plotting import figure from bokeh.models.tickers import FixedTicker p = figure() p.xaxis.ticker = FixedTicker(ticks=[10, 20, 37.4])
x_range_name
A particular (named) x-range to use for computing screen locations when rendering an axis on the plot. If unset, use the default x-range.
y_range_name
A particular (named) y-range to use for computing screen locations when rendering an axis on the plot. If unset, use the default y-range.
{ "axis_label": "", "axis_label_standoff": 5, "axis_label_text_align": "left", "axis_label_text_alpha": { "value": 1.0 }, "axis_label_text_baseline": "bottom", "axis_label_text_color": { "value": "#444444" }, "axis_label_text_font": "helvetica", "axis_label_text_font_size": { "value": "10pt" }, "axis_label_text_font_style": "italic", "axis_label_text_line_height": 1.2, "axis_line_alpha": { "value": 1.0 }, "axis_line_cap": "butt", "axis_line_color": { "value": "black" }, "axis_line_dash": [], "axis_line_dash_offset": 0, "axis_line_join": "bevel", "axis_line_width": { "value": 1 }, "bounds": "auto", "fixed_location": null, "formatter": null, "id": "9683", "js_event_callbacks": {}, "js_property_callbacks": {}, "level": "overlay", "major_label_orientation": "horizontal", "major_label_overrides": {}, "major_label_standoff": 5, "major_label_text_align": "center", "major_label_text_alpha": { "value": 1.0 }, "major_label_text_baseline": "alphabetic", "major_label_text_color": { "value": "#444444" }, "major_label_text_font": "helvetica", "major_label_text_font_size": { "value": "8pt" }, "major_label_text_font_style": "normal", "major_label_text_line_height": 1.2, "major_tick_in": 2, "major_tick_line_alpha": { "value": 1.0 }, "major_tick_line_cap": "butt", "major_tick_line_color": { "value": "black" }, "major_tick_line_dash": [], "major_tick_line_dash_offset": 0, "major_tick_line_join": "bevel", "major_tick_line_width": { "value": 1 }, "major_tick_out": 6, "minor_tick_in": 0, "minor_tick_line_alpha": { "value": 1.0 }, "minor_tick_line_cap": "butt", "minor_tick_line_color": { "value": "black" }, "minor_tick_line_dash": [], "minor_tick_line_dash_offset": 0, "minor_tick_line_join": "bevel", "minor_tick_line_width": { "value": 1 }, "minor_tick_out": 4, "name": null, "subscribed_events": [], "tags": [], "ticker": null, "visible": true, "x_range_name": "default", "y_range_name": "default" }
CategoricalAxis
Bases: bokeh.models.axes.Axis
bokeh.models.axes.Axis
An axis that displays ticks and labels for categorical ranges.
The CategoricalAxis can handle factor ranges with up to two levels of nesting, including drawing a separator line between top-level groups of factors.
group_label_orientation
property type: Either ( Enum ( TickLabelOrientation ), Float )
TickLabelOrientation
What direction the group label text should be oriented.
If a number is supplied, the angle of the text is measured from horizontal.
This property always applies to factors in the outermost level of nesting. If the list of categorical factors is flat (i.e. no nesting) then this property has no effect.
group_text_align
The text align of the group categorical labels.
group_text_alpha
The text alpha of the group categorical labels.
group_text_baseline
The text baseline of the group categorical labels.
group_text_color
The text color of the group categorical labels.
group_text_font
The text font of the group categorical labels.
group_text_font_size
The text font size of the group categorical labels.
group_text_font_style
The text font style of the group categorical labels.
group_text_line_height
The text line height of the group categorical labels.
separator_line_alpha
The line alpha of the separator line between top-level categorical groups.
This property always applies to factors in the outermost level of nesting.
separator_line_cap
The line cap of the separator line between top-level categorical groups.
separator_line_color
The line color of the separator line between top-level categorical groups.
separator_line_dash
The line dash of the separator line between top-level categorical groups.
separator_line_dash_offset
The line dash offset of the separator line between top-level categorical groups.
separator_line_join
The line join of the separator line between top-level categorical groups.
separator_line_width
The line width of the separator line between top-level categorical groups.
subgroup_label_orientation
What direction the subgroup label text should be oriented.
This property always applies to factors in the middle level of nesting. If the list of categorical factors is has only zero or one levels of nesting, then this property has no effect.
subgroup_text_align
The text align of the subgroup categorical labels.
subgroup_text_alpha
The text alpha of the subgroup categorical labels.
subgroup_text_baseline
The text baseline of the subgroup categorical labels.
subgroup_text_color
The text color of the subgroup categorical labels.
subgroup_text_font
The text font of the subgroup categorical labels.
subgroup_text_font_size
The text font size of the subgroup categorical labels.
subgroup_text_font_style
The text font style of the subgroup categorical labels.
subgroup_text_line_height
The text line height of the subgroup categorical labels.
{ "axis_label": "", "axis_label_standoff": 5, "axis_label_text_align": "left", "axis_label_text_alpha": { "value": 1.0 }, "axis_label_text_baseline": "bottom", "axis_label_text_color": { "value": "#444444" }, "axis_label_text_font": "helvetica", "axis_label_text_font_size": { "value": "10pt" }, "axis_label_text_font_style": "italic", "axis_label_text_line_height": 1.2, "axis_line_alpha": { "value": 1.0 }, "axis_line_cap": "butt", "axis_line_color": { "value": "black" }, "axis_line_dash": [], "axis_line_dash_offset": 0, "axis_line_join": "bevel", "axis_line_width": { "value": 1 }, "bounds": "auto", "fixed_location": null, "formatter": { "id": "9738", "type": "CategoricalTickFormatter" }, "group_label_orientation": "parallel", "group_text_align": "left", "group_text_alpha": { "value": 1.0 }, "group_text_baseline": "bottom", "group_text_color": { "value": "grey" }, "group_text_font": "helvetica", "group_text_font_size": { "value": "8pt" }, "group_text_font_style": "bold", "group_text_line_height": 1.2, "id": "9736", "js_event_callbacks": {}, "js_property_callbacks": {}, "level": "overlay", "major_label_orientation": "horizontal", "major_label_overrides": {}, "major_label_standoff": 5, "major_label_text_align": "center", "major_label_text_alpha": { "value": 1.0 }, "major_label_text_baseline": "alphabetic", "major_label_text_color": { "value": "#444444" }, "major_label_text_font": "helvetica", "major_label_text_font_size": { "value": "8pt" }, "major_label_text_font_style": "normal", "major_label_text_line_height": 1.2, "major_tick_in": 2, "major_tick_line_alpha": { "value": 1.0 }, "major_tick_line_cap": "butt", "major_tick_line_color": { "value": "black" }, "major_tick_line_dash": [], "major_tick_line_dash_offset": 0, "major_tick_line_join": "bevel", "major_tick_line_width": { "value": 1 }, "major_tick_out": 6, "minor_tick_in": 0, "minor_tick_line_alpha": { "value": 1.0 }, "minor_tick_line_cap": "butt", "minor_tick_line_color": { "value": "black" }, "minor_tick_line_dash": [], "minor_tick_line_dash_offset": 0, "minor_tick_line_join": "bevel", "minor_tick_line_width": { "value": 1 }, "minor_tick_out": 4, "name": null, "separator_line_alpha": { "value": 1.0 }, "separator_line_cap": "butt", "separator_line_color": { "value": "lightgrey" }, "separator_line_dash": [], "separator_line_dash_offset": 0, "separator_line_join": "bevel", "separator_line_width": { "value": 2 }, "subgroup_label_orientation": "parallel", "subgroup_text_align": "left", "subgroup_text_alpha": { "value": 1.0 }, "subgroup_text_baseline": "bottom", "subgroup_text_color": { "value": "#444444" }, "subgroup_text_font": "helvetica", "subgroup_text_font_size": { "value": "8pt" }, "subgroup_text_font_style": "bold", "subgroup_text_line_height": 1.2, "subscribed_events": [], "tags": [], "ticker": { "id": "9737", "type": "CategoricalTicker" }, "visible": true, "x_range_name": "default", "y_range_name": "default" }
ContinuousAxis
A base class for all numeric, non-categorical axes types.
{ "axis_label": "", "axis_label_standoff": 5, "axis_label_text_align": "left", "axis_label_text_alpha": { "value": 1.0 }, "axis_label_text_baseline": "bottom", "axis_label_text_color": { "value": "#444444" }, "axis_label_text_font": "helvetica", "axis_label_text_font_size": { "value": "10pt" }, "axis_label_text_font_style": "italic", "axis_label_text_line_height": 1.2, "axis_line_alpha": { "value": 1.0 }, "axis_line_cap": "butt", "axis_line_color": { "value": "black" }, "axis_line_dash": [], "axis_line_dash_offset": 0, "axis_line_join": "bevel", "axis_line_width": { "value": 1 }, "bounds": "auto", "fixed_location": null, "formatter": null, "id": "9764", "js_event_callbacks": {}, "js_property_callbacks": {}, "level": "overlay", "major_label_orientation": "horizontal", "major_label_overrides": {}, "major_label_standoff": 5, "major_label_text_align": "center", "major_label_text_alpha": { "value": 1.0 }, "major_label_text_baseline": "alphabetic", "major_label_text_color": { "value": "#444444" }, "major_label_text_font": "helvetica", "major_label_text_font_size": { "value": "8pt" }, "major_label_text_font_style": "normal", "major_label_text_line_height": 1.2, "major_tick_in": 2, "major_tick_line_alpha": { "value": 1.0 }, "major_tick_line_cap": "butt", "major_tick_line_color": { "value": "black" }, "major_tick_line_dash": [], "major_tick_line_dash_offset": 0, "major_tick_line_join": "bevel", "major_tick_line_width": { "value": 1 }, "major_tick_out": 6, "minor_tick_in": 0, "minor_tick_line_alpha": { "value": 1.0 }, "minor_tick_line_cap": "butt", "minor_tick_line_color": { "value": "black" }, "minor_tick_line_dash": [], "minor_tick_line_dash_offset": 0, "minor_tick_line_join": "bevel", "minor_tick_line_width": { "value": 1 }, "minor_tick_out": 4, "name": null, "subscribed_events": [], "tags": [], "ticker": null, "visible": true, "x_range_name": "default", "y_range_name": "default" }
DatetimeAxis
Bases: bokeh.models.axes.LinearAxis
bokeh.models.axes.LinearAxis
A LinearAxis that picks nice numbers for tick locations on a datetime scale. Configured with a DatetimeTickFormatter by default.
LinearAxis
DatetimeTickFormatter
{ "axis_label": "", "axis_label_standoff": 5, "axis_label_text_align": "left", "axis_label_text_alpha": { "value": 1.0 }, "axis_label_text_baseline": "bottom", "axis_label_text_color": { "value": "#444444" }, "axis_label_text_font": "helvetica", "axis_label_text_font_size": { "value": "10pt" }, "axis_label_text_font_style": "italic", "axis_label_text_line_height": 1.2, "axis_line_alpha": { "value": 1.0 }, "axis_line_cap": "butt", "axis_line_color": { "value": "black" }, "axis_line_dash": [], "axis_line_dash_offset": 0, "axis_line_join": "bevel", "axis_line_width": { "value": 1 }, "bounds": "auto", "fixed_location": null, "formatter": { "id": "9767", "type": "DatetimeTickFormatter" }, "id": "9765", "js_event_callbacks": {}, "js_property_callbacks": {}, "level": "overlay", "major_label_orientation": "horizontal", "major_label_overrides": {}, "major_label_standoff": 5, "major_label_text_align": "center", "major_label_text_alpha": { "value": 1.0 }, "major_label_text_baseline": "alphabetic", "major_label_text_color": { "value": "#444444" }, "major_label_text_font": "helvetica", "major_label_text_font_size": { "value": "8pt" }, "major_label_text_font_style": "normal", "major_label_text_line_height": 1.2, "major_tick_in": 2, "major_tick_line_alpha": { "value": 1.0 }, "major_tick_line_cap": "butt", "major_tick_line_color": { "value": "black" }, "major_tick_line_dash": [], "major_tick_line_dash_offset": 0, "major_tick_line_join": "bevel", "major_tick_line_width": { "value": 1 }, "major_tick_out": 6, "minor_tick_in": 0, "minor_tick_line_alpha": { "value": 1.0 }, "minor_tick_line_cap": "butt", "minor_tick_line_color": { "value": "black" }, "minor_tick_line_dash": [], "minor_tick_line_dash_offset": 0, "minor_tick_line_join": "bevel", "minor_tick_line_width": { "value": 1 }, "minor_tick_out": 4, "name": null, "subscribed_events": [], "tags": [], "ticker": { "id": "9766", "type": "DatetimeTicker" }, "visible": true, "x_range_name": "default", "y_range_name": "default" }
Bases: bokeh.models.axes.ContinuousAxis
bokeh.models.axes.ContinuousAxis
An axis that picks nice numbers for tick locations on a linear scale. Configured with a BasicTickFormatter by default.
BasicTickFormatter
{ "axis_label": "", "axis_label_standoff": 5, "axis_label_text_align": "left", "axis_label_text_alpha": { "value": 1.0 }, "axis_label_text_baseline": "bottom", "axis_label_text_color": { "value": "#444444" }, "axis_label_text_font": "helvetica", "axis_label_text_font_size": { "value": "10pt" }, "axis_label_text_font_style": "italic", "axis_label_text_line_height": 1.2, "axis_line_alpha": { "value": 1.0 }, "axis_line_cap": "butt", "axis_line_color": { "value": "black" }, "axis_line_dash": [], "axis_line_dash_offset": 0, "axis_line_join": "bevel", "axis_line_width": { "value": 1 }, "bounds": "auto", "fixed_location": null, "formatter": { "id": "9770", "type": "BasicTickFormatter" }, "id": "9768", "js_event_callbacks": {}, "js_property_callbacks": {}, "level": "overlay", "major_label_orientation": "horizontal", "major_label_overrides": {}, "major_label_standoff": 5, "major_label_text_align": "center", "major_label_text_alpha": { "value": 1.0 }, "major_label_text_baseline": "alphabetic", "major_label_text_color": { "value": "#444444" }, "major_label_text_font": "helvetica", "major_label_text_font_size": { "value": "8pt" }, "major_label_text_font_style": "normal", "major_label_text_line_height": 1.2, "major_tick_in": 2, "major_tick_line_alpha": { "value": 1.0 }, "major_tick_line_cap": "butt", "major_tick_line_color": { "value": "black" }, "major_tick_line_dash": [], "major_tick_line_dash_offset": 0, "major_tick_line_join": "bevel", "major_tick_line_width": { "value": 1 }, "major_tick_out": 6, "minor_tick_in": 0, "minor_tick_line_alpha": { "value": 1.0 }, "minor_tick_line_cap": "butt", "minor_tick_line_color": { "value": "black" }, "minor_tick_line_dash": [], "minor_tick_line_dash_offset": 0, "minor_tick_line_join": "bevel", "minor_tick_line_width": { "value": 1 }, "minor_tick_out": 4, "name": null, "subscribed_events": [], "tags": [], "ticker": { "id": "9769", "type": "BasicTicker" }, "visible": true, "x_range_name": "default", "y_range_name": "default" }
LogAxis
An axis that picks nice numbers for tick locations on a log scale. Configured with a LogTickFormatter by default.
LogTickFormatter
{ "axis_label": "", "axis_label_standoff": 5, "axis_label_text_align": "left", "axis_label_text_alpha": { "value": 1.0 }, "axis_label_text_baseline": "bottom", "axis_label_text_color": { "value": "#444444" }, "axis_label_text_font": "helvetica", "axis_label_text_font_size": { "value": "10pt" }, "axis_label_text_font_style": "italic", "axis_label_text_line_height": 1.2, "axis_line_alpha": { "value": 1.0 }, "axis_line_cap": "butt", "axis_line_color": { "value": "black" }, "axis_line_dash": [], "axis_line_dash_offset": 0, "axis_line_join": "bevel", "axis_line_width": { "value": 1 }, "bounds": "auto", "fixed_location": null, "formatter": { "id": "9773", "type": "LogTickFormatter" }, "id": "9771", "js_event_callbacks": {}, "js_property_callbacks": {}, "level": "overlay", "major_label_orientation": "horizontal", "major_label_overrides": {}, "major_label_standoff": 5, "major_label_text_align": "center", "major_label_text_alpha": { "value": 1.0 }, "major_label_text_baseline": "alphabetic", "major_label_text_color": { "value": "#444444" }, "major_label_text_font": "helvetica", "major_label_text_font_size": { "value": "8pt" }, "major_label_text_font_style": "normal", "major_label_text_line_height": 1.2, "major_tick_in": 2, "major_tick_line_alpha": { "value": 1.0 }, "major_tick_line_cap": "butt", "major_tick_line_color": { "value": "black" }, "major_tick_line_dash": [], "major_tick_line_dash_offset": 0, "major_tick_line_join": "bevel", "major_tick_line_width": { "value": 1 }, "major_tick_out": 6, "minor_tick_in": 0, "minor_tick_line_alpha": { "value": 1.0 }, "minor_tick_line_cap": "butt", "minor_tick_line_color": { "value": "black" }, "minor_tick_line_dash": [], "minor_tick_line_dash_offset": 0, "minor_tick_line_join": "bevel", "minor_tick_line_width": { "value": 1 }, "minor_tick_out": 4, "name": null, "subscribed_events": [], "tags": [], "ticker": { "id": "9772", "type": "LogTicker" }, "visible": true, "x_range_name": "default", "y_range_name": "default" }
MercatorAxis
An axis that picks nice numbers for tick locations on a Mercator scale. Configured with a MercatorTickFormatter by default.
MercatorTickFormatter
dimension ('lat' or 'lon', optional) – Whether this axis will display latitude or longitude values. (default: ‘lat’)
{ "axis_label": "", "axis_label_standoff": 5, "axis_label_text_align": "left", "axis_label_text_alpha": { "value": 1.0 }, "axis_label_text_baseline": "bottom", "axis_label_text_color": { "value": "#444444" }, "axis_label_text_font": "helvetica", "axis_label_text_font_size": { "value": "10pt" }, "axis_label_text_font_style": "italic", "axis_label_text_line_height": 1.2, "axis_line_alpha": { "value": 1.0 }, "axis_line_cap": "butt", "axis_line_color": { "value": "black" }, "axis_line_dash": [], "axis_line_dash_offset": 0, "axis_line_join": "bevel", "axis_line_width": { "value": 1 }, "bounds": "auto", "fixed_location": null, "formatter": { "id": "9777", "type": "MercatorTickFormatter" }, "id": "9774", "js_event_callbacks": {}, "js_property_callbacks": {}, "level": "overlay", "major_label_orientation": "horizontal", "major_label_overrides": {}, "major_label_standoff": 5, "major_label_text_align": "center", "major_label_text_alpha": { "value": 1.0 }, "major_label_text_baseline": "alphabetic", "major_label_text_color": { "value": "#444444" }, "major_label_text_font": "helvetica", "major_label_text_font_size": { "value": "8pt" }, "major_label_text_font_style": "normal", "major_label_text_line_height": 1.2, "major_tick_in": 2, "major_tick_line_alpha": { "value": 1.0 }, "major_tick_line_cap": "butt", "major_tick_line_color": { "value": "black" }, "major_tick_line_dash": [], "major_tick_line_dash_offset": 0, "major_tick_line_join": "bevel", "major_tick_line_width": { "value": 1 }, "major_tick_out": 6, "minor_tick_in": 0, "minor_tick_line_alpha": { "value": 1.0 }, "minor_tick_line_cap": "butt", "minor_tick_line_color": { "value": "black" }, "minor_tick_line_dash": [], "minor_tick_line_dash_offset": 0, "minor_tick_line_join": "bevel", "minor_tick_line_width": { "value": 1 }, "minor_tick_out": 4, "name": null, "subscribed_events": [], "tags": [], "ticker": { "id": "9775", "type": "MercatorTicker" }, "visible": true, "x_range_name": "default", "y_range_name": "default" }