axes#
Guide renderers for various kinds of axes that can be added to Bokeh plots
- class Axis(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
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#
A text or LaTeX notation label for the axis, displayed parallel to the axis rule.
- axis_label_align#
The alignment of axis label along the axis.
- axis_label_orientation#
What direction the axis label text should be oriented. If a number is supplied, the angle of the text is measured from horizontal.
- axis_label_standoff#
The distance in pixels that the axis labels should be offset from the tick labels or axis.
- axis_label_standoff_mode#
The reference point for the distance of the
axis_label_standoff.
- axis_label_text_align#
The text align of the axis label.
- axis_label_text_alpha#
The text alpha of the axis label.
- axis_label_text_baseline#
The text baseline of the axis label.
- axis_label_text_color#
The text color of the axis label.
- axis_label_text_font#
The text font of the axis label.
- axis_label_text_font_size#
The text font size of the axis label.
- axis_label_text_font_style#
The text font style of the axis label.
- axis_label_text_line_height#
The text line height of the axis label.
- axis_label_text_outline_color#
The text outline color of the axis label.
- axis_label_text_outline_width#
The text outline width of the axis label.
- axis_line_alpha#
The line alpha of the axis line.
- axis_line_cap#
The line cap of the axis line.
- axis_line_color#
The line color of the axis line.
- axis_line_dash#
The line dash of the axis line.
- axis_line_dash_offset#
The line dash offset of the axis line.
- axis_line_join#
The line join of the axis line.
- axis_line_width#
The line width of the axis line.
- background_fill_alpha#
The fill alpha of the axis background.
- background_fill_color#
The fill color of the axis background.
- background_hatch_alpha#
The hatch alpha of the axis background.
- background_hatch_color#
The hatch color of the axis background.
- background_hatch_extra#
The hatch extra of the axis background.
- background_hatch_pattern#
The hatch pattern of the axis background.
- background_hatch_scale#
The hatch scale of the axis background.
- background_hatch_weight#
The hatch weight of the axis background.
- bounds#
Bounds for the rendered axis. If unset, the axis will span the entire plot in the given dimension.
- dimension#
This allows to override the inferred dimensions in contexts that support this. This property has no effect when an axes is used as a frame axis.
Note
This property is experimental and may change at any point.
- face#
The direction toward which the axis will face.
Note
This property is experimental and may change at any point.
- fixed_location#
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.
Note
Axes labels are suppressed when axes are positioned at fixed locations inside the central plot area.
- formatter#
A
TickFormatterto use for formatting the visual appearance of ticks.
- major_label_orientation#
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#
Provide explicit tick label values for specific tick locations that override normal formatting.
- major_label_policy#
Allows to filter out labels, e.g. declutter labels to avoid overlap.
- 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_label_text_outline_color#
The text outline color of the major tick labels.
- major_label_text_outline_width#
The text outline width 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#
The distance in pixels that major ticks should extend out of the main plot area.
- 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 codefrom bokeh.plotting import figure p = figure() p.xaxis.ticker = [10, 20, 37.4]
is equivalent to:
from bokeh.plotting import figure from bokeh.models import FixedTicker p = figure() p.xaxis.ticker = FixedTicker(ticks=[10, 20, 37.4])
- class CategoricalAxis(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
An axis that displays ticks and labels for categorical ranges.
The
CategoricalAxiscan handle factor ranges with up to two levels of nesting, including drawing a separator line between top-level groups of factors.- group_label_orientation#
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.
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_alpha#
The text alpha of the group categorical labels.
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_baseline#
The text baseline of the group categorical labels.
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_color#
The text color of the group categorical labels.
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_font#
The text font of the group categorical labels.
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_font_size#
The text font size of the group categorical labels.
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_font_style#
The text font style of the group categorical labels.
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_line_height#
The text line height of the group categorical labels.
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_outline_color#
The text outline color of the group categorical labels.
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_outline_width#
The text outline width of the group categorical labels.
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.
- 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.
This property always applies to factors in the outermost level of nesting.
- separator_line_color#
The line color of the separator line between top-level categorical groups.
This property always applies to factors in the outermost level of nesting.
- separator_line_dash#
The line dash of the separator line between top-level categorical groups.
This property always applies to factors in the outermost level of nesting.
- separator_line_dash_offset#
The line dash offset of the separator line between top-level categorical groups.
This property always applies to factors in the outermost level of nesting.
- separator_line_join#
The line join of the separator line between top-level categorical groups.
This property always applies to factors in the outermost level of nesting.
- separator_line_width#
The line width of the separator line between top-level categorical groups.
This property always applies to factors in the outermost level of nesting.
- subgroup_label_orientation#
What direction the subgroup 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 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.
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_alpha#
The text alpha of the subgroup categorical labels.
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_baseline#
The text baseline of the subgroup categorical labels.
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_color#
The text color of the subgroup categorical labels.
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_font#
The text font of the subgroup categorical labels.
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_font_size#
The text font size of the subgroup categorical labels.
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_font_style#
The text font style of the subgroup categorical labels.
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_line_height#
The text line height of the subgroup categorical labels.
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_outline_color#
The text outline color of the subgroup categorical labels.
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_outline_width#
The text outline width of the subgroup categorical labels.
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.
- class ContinuousAxis(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
A base class for all numeric, non-categorical axes 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 DatetimeAxis(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
A
LinearAxisthat picks nice numbers for tick locations on a datetime scale. Configured with aDatetimeTickFormatterby default.
- class LinearAxis(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
An axis that picks nice numbers for tick locations on a linear scale. Configured with a
BasicTickFormatterby default.
- class LogAxis(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
An axis that picks nice numbers for tick locations on a log scale. Configured with a
LogTickFormatterby default.
- class MercatorAxis(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
An axis that picks nice numbers for tick locations on a Mercator scale. Configured with a
MercatorTickFormatterby default.- Parameters:
dimension ('lat' or 'lon', optional) – Whether this axis will display latitude or longitude values. (default: ‘lat’)