xpectral.charts

Bokeh visualization accessor registered on Polars and pandas DataFrames as df.bokeh.

class xpectral.charts.accessors.BokehAccessor(df)[source]

Bases: Figure

annular_wedge(*args, **kwargs)[source]

Configure and add AnnularWedge glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates of the center of the annular wedges. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates of the center of the annular wedges. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • inner_radius (DistanceSpec, optional) – The inner radii of the annular wedges. (default: Field(field=’inner_radius’, transform=Unspecified, units=Unspecified))

  • outer_radius (DistanceSpec, optional) – The outer radii of the annular wedges. (default: Field(field=’outer_radius’, transform=Unspecified, units=Unspecified))

  • start_angle (AngleSpec, optional) – The angles to start the annular wedges, as measured from the horizontal. (default: Field(field=’start_angle’, transform=Unspecified, units=Unspecified))

  • end_angle (AngleSpec, optional) – The angles to end the annular wedges, as measured from the horizontal. (default: Field(field=’end_angle’, transform=Unspecified, units=Unspecified))

  • direction (Enum(Direction), optional) – Which direction to stroke between the start and end angles. (default: ‘anticlock’)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • end_angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the annular wedges. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the annular wedges. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the annular wedges. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the annular wedges. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the annular wedges. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the annular wedges.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the annular wedges. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the annular wedges. (default: 1.0)

  • inner_radius_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the annular wedges. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the annular wedges. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the annular wedges. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the annular wedges. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the annular wedges. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the annular wedges. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the annular wedges. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • outer_radius_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • start_angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

annulus(*args, **kwargs)[source]

Configure and add Annulus glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates of the center of the annuli. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates of the center of the annuli. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • inner_radius (DistanceSpec, optional) – The inner radii of the annuli. (default: Field(field=’inner_radius’, transform=Unspecified, units=Unspecified))

  • outer_radius (DistanceSpec, optional) – The outer radii of the annuli. (default: Field(field=’outer_radius’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the annuli. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the annuli. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the annuli. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the annuli. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the annuli. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the annuli.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the annuli. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the annuli. (default: 1.0)

  • inner_radius_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the annuli. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the annuli. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the annuli. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the annuli. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the annuli. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the annuli. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the annuli. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • outer_radius_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

arc(*args, **kwargs)[source]

Configure and add Arc glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates of the center of the arcs. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates of the center of the arcs. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • radius (DistanceSpec, optional) – Radius of the arc. (default: Field(field=’radius’, transform=Unspecified, units=Unspecified))

  • start_angle (AngleSpec, optional) – The angles to start the arcs, as measured from the horizontal. (default: Field(field=’start_angle’, transform=Unspecified, units=Unspecified))

  • end_angle (AngleSpec, optional) – The angles to end the arcs, as measured from the horizontal. (default: Field(field=’end_angle’, transform=Unspecified, units=Unspecified))

  • direction (Enum(Direction), optional) – Which direction to stroke between the start and end angles. (default: ‘anticlock’)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • end_angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the arcs. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the arcs. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the arcs. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the arcs. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the arcs. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the arcs. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the arcs. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • radius_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • start_angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

block(*args, **kwargs)[source]

Configure and add Block glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates of each block’s lower-left corner. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates of each block’s lower-left corner. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • width (DistanceSpec, optional) – The widths of the blocks. (default: 1)

  • height (DistanceSpec, optional) – The heights of the blocks. (default: 1)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • border_radius (Either(NonNegative, Tuple(NonNegative, NonNegative, NonNegative, NonNegative), Struct)) –

    Allows the box to have rounded corners.

    Note

    This property is experimental and may change at any point. (default: 0)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the blocks. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the blocks. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the blocks. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the blocks. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the blocks. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the blocks.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the blocks. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the blocks. (default: 1.0)

  • height_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the blocks. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the blocks. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the blocks. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the blocks. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the blocks. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the blocks. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the blocks. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

  • width_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

ellipse(*args, **kwargs)[source]

Configure and add Ellipse glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates of the centers of the ellipses. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates of the centers of the ellipses. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • width (DistanceSpec, optional) – The widths of each ellipse. (default: Field(field=’width’, transform=Unspecified, units=Unspecified))

  • height (DistanceSpec, optional) – The heights of each ellipse. (default: Field(field=’height’, transform=Unspecified, units=Unspecified))

  • angle (AngleSpec) – The angle the ellipses are rotated from horizontal. [rad] (default: 0.0)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the ellipses. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the ellipses. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the ellipses. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the ellipses. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the ellipses. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the ellipses.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the ellipses. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the ellipses. (default: 1.0)

  • height_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the ellipses. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the ellipses. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the ellipses. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the ellipses. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the ellipses. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the ellipses. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the ellipses. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

  • width_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

image(*args, **kwargs)[source]

Configure and add Image glyphs to this figure.

Parameters:
  • image (NumberSpec, optional) – The arrays of scalar data for the images to be colormapped. (default: Field(field=’image’, transform=Unspecified, units=Unspecified))

  • x (NumberSpec, optional) – The x-coordinates to locate the image anchors. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates to locate the image anchors. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • dw (DistanceSpec, optional) –

    The widths of the plot regions that the images will occupy.

    Note

    This is not the number of pixels that an image is wide. That number is fixed by the image itself. (default: Field(field=’dw’, transform=Unspecified, units=Unspecified))

  • dh (DistanceSpec, optional) –

    The height of the plot region that the image will occupy.

    Note

    This is not the number of pixels that an image is tall. That number is fixed by the image itself. (default: Field(field=’dh’, transform=Unspecified, units=Unspecified))

  • dilate (Bool) –

    Whether to always round fractional pixel locations in such a way as to make the images bigger.

    This setting may be useful if pixel rounding errors are causing images to have a gap between them, when they should appear flush. (default: False)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • anchor (Either(Enum(Anchor), Tuple(Either(Enum(Align), Enum(HAlign), Percent), Either(Enum(Align), Enum(VAlign), Percent))), optional) – Position of the image should be anchored at the x, y coordinates. (default: ‘bottom_left’)

  • color_mapper (Instance(ColorMapper), optional) –

    A ColorMapper to use to map the scalar data from image into RGBA values for display.

    The name of a palette from bokeh.palettes may also be set, in which case a LinearColorMapper configured with the named palette will be used.

    Note

    The color mapping step happens on the client. (default: <Instance: LinearColorMapper(palette=Greys9)>)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • dh_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • dw_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • global_alpha (AlphaSpec, optional) – The global alpha values for the images. (default: 1.0)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • origin (Enum(ImageOrigin), optional) – Defines the coordinate space of an image. (default: ‘bottom_left’)

  • palette (str or list[color value])

  • from (a palette to construct a value for the color mapper property)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

image_rgba(*args, **kwargs)[source]

Configure and add ImageRGBA glyphs to this figure.

Parameters:
  • image (NumberSpec, optional) – The arrays of RGBA data for the images. (default: Field(field=’image’, transform=Unspecified, units=Unspecified))

  • x (NumberSpec, optional) – The x-coordinates to locate the image anchors. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates to locate the image anchors. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • dw (DistanceSpec, optional) –

    The widths of the plot regions that the images will occupy.

    Note

    This is not the number of pixels that an image is wide. That number is fixed by the image itself. (default: Field(field=’dw’, transform=Unspecified, units=Unspecified))

  • dh (DistanceSpec, optional) –

    The height of the plot region that the image will occupy.

    Note

    This is not the number of pixels that an image is tall. That number is fixed by the image itself. (default: Field(field=’dh’, transform=Unspecified, units=Unspecified))

  • dilate (Bool) –

    Whether to always round fractional pixel locations in such a way as to make the images bigger.

    This setting may be useful if pixel rounding errors are causing images to have a gap between them, when they should appear flush. (default: False)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • anchor (Either(Enum(Anchor), Tuple(Either(Enum(Align), Enum(HAlign), Percent), Either(Enum(Align), Enum(VAlign), Percent))), optional) – Position of the image should be anchored at the x, y coordinates. (default: ‘bottom_left’)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • dh_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • dw_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • global_alpha (AlphaSpec, optional) – The global alpha values for the images. (default: 1.0)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • origin (Enum(ImageOrigin), optional) – Defines the coordinate space of an image. (default: ‘bottom_left’)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

image_stack(*args, **kwargs)[source]

Configure and add ImageStack glyphs to this figure.

Parameters:
  • image (NumberSpec, optional) – The 3D arrays of data for the images. (default: Field(field=’image’, transform=Unspecified, units=Unspecified))

  • x (NumberSpec, optional) – The x-coordinates to locate the image anchors. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates to locate the image anchors. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • dw (DistanceSpec, optional) –

    The widths of the plot regions that the images will occupy.

    Note

    This is not the number of pixels that an image is wide. That number is fixed by the image itself. (default: Field(field=’dw’, transform=Unspecified, units=Unspecified))

  • dh (DistanceSpec, optional) –

    The height of the plot region that the image will occupy.

    Note

    This is not the number of pixels that an image is tall. That number is fixed by the image itself. (default: Field(field=’dh’, transform=Unspecified, units=Unspecified))

  • dilate (Bool) –

    Whether to always round fractional pixel locations in such a way as to make the images bigger.

    This setting may be useful if pixel rounding errors are causing images to have a gap between them, when they should appear flush. (default: False)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • anchor (Either(Enum(Anchor), Tuple(Either(Enum(Align), Enum(HAlign), Percent), Either(Enum(Align), Enum(VAlign), Percent))), optional) – Position of the image should be anchored at the x, y coordinates. (default: ‘bottom_left’)

  • color_mapper (Instance(StackColorMapper), optional) –

    ScalarColorMapper used to map the scalar data from image into RGBA values for display.

    Note

    The color mapping step happens on the client. (default: Undefined)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • dh_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • dw_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • global_alpha (AlphaSpec, optional) – The global alpha values for the images. (default: 1.0)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • origin (Enum(ImageOrigin), optional) – Defines the coordinate space of an image. (default: ‘bottom_left’)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

image_url(*args, **kwargs)[source]

Configure and add ImageURL glyphs to this figure.

Parameters:
  • url (StringSpec) –

    The URLs to retrieve images from.

    Note

    The actual retrieving and loading of the images happens on the client.

  • x (NumberSpec) – The x-coordinates to locate the image anchors.

  • y (NumberSpec) – The y-coordinates to locate the image anchors.

  • w (NullDistanceSpec) –

    The width of the plot region that the image will occupy in data space.

    The default value is None, in which case the image will be displayed at its actual image size (regardless of the units specified here).

  • h (NullDistanceSpec) –

    The height of the plot region that the image will occupy in data space.

    The default value is None, in which case the image will be displayed at its actual image size (regardless of the units specified here).

  • angle (AngleSpec) – The angles to rotate the images, as measured from the horizontal. (default: 0)

  • dilate (Bool) –

    Whether to always round fractional pixel locations in such a way as to make the images bigger.

    This setting may be useful if pixel rounding errors are causing images to have a gap between them, when they should appear flush. (default: False)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • anchor (Either(Enum(Anchor), Tuple(Either(Enum(Align), Enum(HAlign), Percent), Either(Enum(Align), Enum(VAlign), Percent))), optional) – Position of the image should be anchored at the x, y coordinates. (default: ‘top_left’)

  • angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • global_alpha (NumberSpec, optional) – An overall opacity that each image is rendered with (in addition to any inherent alpha values in the image itself). (default: 1.0)

  • h_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • retry_attempts (Int) – Number of attempts to retry loading the images from the specified URL. Default is zero. (default: 0)

  • retry_timeout (Int) – Timeout (in ms) between retry attempts to load the image from the specified URL. Default is zero ms. (default: 0)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

  • w_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

line(*args, **kwargs)[source]

Configure and add Line glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates for the points of the line. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates for the points of the line. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • line_alpha (Alpha, optional) – The line alpha values for the line. (default: 1.0)

  • line_cap (Enum(LineCap), optional) – The line cap values for the line. (default: ‘butt’)

  • line_color (Nullable(Color), optional) – The line color values for the line. (default: ‘black’)

  • line_dash (DashPattern) – The line dash values for the line. (default: [])

  • line_dash_offset (Int) – The line dash offset values for the line. (default: 0)

  • line_join (Enum(LineJoin), optional) – The line join values for the line. (default: ‘bevel’)

  • line_width (Float, optional) – The line width values for the line. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

mathml_glyph(*args, **kwargs)[source]

Configure and add MathMLGlyph glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates to locate the text anchors. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates to locate the text anchors. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • text (StringSpec, optional) – The text values to render. (default: Field(field=’text’, transform=Unspecified, units=Unspecified))

  • angle (AngleSpec) – The angles to rotate the text, as measured from the horizontal. (default: 0)

  • x_offset (FloatSpec) –

    Offset values in pixels to apply to the x-coordinates.

    This is useful, for instance, if it is desired to “float” text a fixed distance in |screen units| from a given data position. (default: 0)

  • y_offset (FloatSpec) –

    Offset values in pixels to apply to the y-coordinates.

    This is useful, for instance, if it is desired to “float” text a fixed distance in |screen units| from a given data position. (default: 0)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • anchor (DataSpec, optional) –

    Position within the bounding box of this glyph to which x and y coordinates are anchored to. This can be a named anchor point like top_left or center, or a percentage from from left to right and top to bottom, or a combination of those, independently in width and height. If set to auto, then anchor point will be determined from text align and baseline.

    Note

    This property is experimental and may change at any point. (default: Value(value=’auto’, transform=Unspecified, units=Unspecified))

  • angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • background_fill_alpha (AlphaSpec, optional) – The fill alpha values for the text bounding box. (default: 1.0)

  • background_fill_color (ColorSpec) – The fill color values for the text bounding box.

  • background_hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the text bounding box. (default: 1.0)

  • background_hatch_color (ColorSpec) – The hatch color values for the text bounding box.

  • background_hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the text bounding box. (default: {})

  • background_hatch_pattern (HatchPatternSpec) – The hatch pattern values for the text bounding box.

  • background_hatch_scale (FloatSpec, optional) – The hatch scale values for the text bounding box. (default: 12.0)

  • background_hatch_weight (FloatSpec, optional) – The hatch weight values for the text bounding box. (default: 1.0)

  • border_line_alpha (AlphaSpec, optional) – The line alpha values for the text bounding box. (default: 1.0)

  • border_line_cap (LineCapSpec, optional) – The line cap values for the text bounding box. (default: ‘butt’)

  • border_line_color (ColorSpec) – The line color values for the text bounding box.

  • border_line_dash (DashPatternSpec) – The line dash values for the text bounding box. (default: [])

  • border_line_dash_offset (IntSpec) – The line dash offset values for the text bounding box. (default: 0)

  • border_line_join (LineJoinSpec, optional) – The line join values for the text bounding box. (default: ‘bevel’)

  • border_line_width (FloatSpec, optional) – The line width values for the text bounding box. (default: 1)

  • border_radius (Either(NonNegative, Tuple(NonNegative, NonNegative, NonNegative, NonNegative), Struct)) –

    Allows the box to have rounded corners. For the best results, it should be used in combination with padding.

    Note

    This property is experimental and may change at any point. (default: 0)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • outline_shape (DataSpec, optional) –

    Specify the shape of the outline for the text box.

    The default outline is of a text box is its bounding box (or rectangle). This can be changed to a selection of pre-defined shapes, like circle, ellipse, diamond, parallelogram, etc. Those shapes are circumscribed onto the bounding box, so that the contents of a box fit inside those shapes.

    This property is in effect only when either border line, background fill and/or background hatch properties are set. The user can choose "none" to avoid drawing any shape, even if border or background visuals are set.

    Note

    This property is experimental and may change at any point.

    Note

    Currently hit testing only uses the bounding box of text contents of the glyph, which is equivalent to using box/rectangle shape. (default: ‘box’)

  • padding (Either(NonNegative, Tuple(NonNegative, NonNegative), Struct, Tuple(NonNegative, NonNegative, NonNegative, NonNegative), Struct)) –

    Extra space between the text of a glyphs and its bounding box (border).

    Note

    This property is experimental and may change at any point. (default: 0)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

  • text_align (TextAlignSpec, optional) – The text align values for the text. (default: ‘left’)

  • text_alpha (AlphaSpec, optional) – The text alpha values for the text. (default: 1.0)

  • text_baseline (TextBaselineSpec, optional) – The text baseline values for the text. (default: ‘bottom’)

  • text_color (ColorSpec, optional) – The text color values for the text. (default: ‘#444444’)

  • text_font (StringSpec, optional) – The text font values for the text. (default: Value(value=’helvetica’, transform=Unspecified, units=Unspecified))

  • text_font_size (FontSizeSpec, optional) – The text font size values for the text. (default: Value(value=’16px’, transform=Unspecified, units=Unspecified))

  • text_font_style (FontStyleSpec, optional) – The text font style values for the text. (default: ‘normal’)

  • text_line_height (NumberSpec, optional) – The text line height values for the text. (default: 1.2)

  • text_outline_color (ColorSpec) – The text outline color values for the text.

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

ngon(*args, **kwargs)[source]

Configure and add Ngon glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates of the center of the n-gons. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates of the center of the n-gons. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • radius (DistanceSpec, optional) – The radius values for n-gons (in |data units|, by default). The radius is measured from the center to the vertices of the n-gons. (default: Undefined)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • angle (AngleSpec) – The angles in radians to rotate the n-gons. When the value is zero, a vertex is drawn directly above the center coordinate. (default: 0)

  • angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the n-gons. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the n-gons. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the n-gons. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the n-gons. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the n-gons. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the n-gons.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the n-gons. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the n-gons. (default: 1.0)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the n-gons. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the n-gons. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the n-gons. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the n-gons. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the n-gons. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the n-gons. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the n-gons. (default: 1)

  • n (NumberSpec, optional) – The number of sides of the n-gons. Values less than three will result in no glyph instance being drawn. (default: Field(field=’n’, transform=Unspecified, units=Unspecified))

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • radius_dimension (Enum(RadiusDimension), optional) –

    What dimension to measure n-gons radii along.

    When the data space aspect ratio is not 1-1, then the size of the drawn n-gons depends on what direction is used to measure the “distance” of the radius. This property allows that direction to be controlled.

    Setting this dimension to ‘max’ will calculate the radius on both the x and y dimensions and use the maximum of the two, ‘min’ selects the minimum. (default: ‘x’)

  • radius_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

patch(*args, **kwargs)[source]

Configure and add Patch glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) –

    The x-coordinates for the points of the patch.

    Note

    A patch may comprise multiple polygons. In this case the x-coordinates for each polygon should be separated by NaN values in the sequence. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) –

    The y-coordinates for the points of the patch.

    Note

    A patch may comprise multiple polygons. In this case the y-coordinates for each polygon should be separated by NaN values in the sequence. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (Alpha, optional) – The fill alpha values for the patch. (default: 1.0)

  • fill_color (Nullable(Color), optional) – The fill color values for the patch. (default: ‘gray’)

  • hatch_alpha (Alpha, optional) – The hatch alpha values for the patch. (default: 1.0)

  • hatch_color (Nullable(Color), optional) – The hatch color values for the patch. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the patch. (default: {})

  • hatch_pattern (Nullable(String)) – The hatch pattern values for the patch.

  • hatch_scale (Size, optional) – The hatch scale values for the patch. (default: 12.0)

  • hatch_weight (Size, optional) – The hatch weight values for the patch. (default: 1.0)

  • line_alpha (Alpha, optional) – The line alpha values for the patch. (default: 1.0)

  • line_cap (Enum(LineCap), optional) – The line cap values for the patch. (default: ‘butt’)

  • line_color (Nullable(Color), optional) – The line color values for the patch. (default: ‘black’)

  • line_dash (DashPattern) – The line dash values for the patch. (default: [])

  • line_dash_offset (Int) – The line dash offset values for the patch. (default: 0)

  • line_join (Enum(LineJoin), optional) – The line join values for the patch. (default: ‘bevel’)

  • line_width (Float, optional) – The line width values for the patch. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

ray(*args, **kwargs)[source]

Configure and add Ray glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates to start the rays. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates to start the rays. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • length (DistanceSpec) – The length to extend the ray. Note that this length defaults to |data units| (measured in the x-direction). (default: 0)

  • angle (AngleSpec) – The angles in radians to extend the rays, as measured from the horizontal. (default: 0)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • length_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the rays. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the rays. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the rays. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the rays. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the rays. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the rays. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the rays. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

rect(*args, **kwargs)[source]

Configure and add Rect glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates of the centers of the rectangles. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates of the centers of the rectangles. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • width (DistanceSpec, optional) – The overall widths of the rectangles. (default: Field(field=’width’, transform=Unspecified, units=Unspecified))

  • height (DistanceSpec, optional) – The overall heights of the rectangles. (default: Field(field=’height’, transform=Unspecified, units=Unspecified))

  • angle (AngleSpec) – The angles to rotate the rectangles, as measured from the horizontal. (default: 0.0)

  • dilate (Bool) –

    Whether to always round fractional pixel locations in such a way as to make the rectangles bigger.

    This setting may be useful if pixel rounding errors are causing rectangles to have a gap between them, when they should appear flush. (default: False)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • border_radius (Either(NonNegative, Tuple(NonNegative, NonNegative, NonNegative, NonNegative), Struct)) –

    Allows the box to have rounded corners.

    Note

    This property is experimental and may change at any point. (default: 0)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the rectangles. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the rectangles. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the rectangles. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the rectangles. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the rectangles. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the rectangles.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the rectangles. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the rectangles. (default: 1.0)

  • height_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the rectangles. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the rectangles. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the rectangles. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the rectangles. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the rectangles. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the rectangles. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the rectangles. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

  • width_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

scatter(*args, **kwargs)[source]

Configure and add Scatter glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-axis coordinates for the center of the markers. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-axis coordinates for the center of the markers. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • size (SizeSpec, optional) – The size (diameter) values for the markers in screen space units. (default: 4)

  • angle (AngleSpec) – The angles to rotate the markers. (default: 0.0)

  • marker (MarkerSpec, optional) – Which marker to render. This can be the name of any built in marker, e.g. “circle”, or a reference to a data column containing such names. (default: ‘circle’)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • defs (Dict(Regex, Instance(CustomJS))) –

    A collection of custom marker definitions.

    There are two ways to define a custom marker:

    • construct and return an instance of Path2D:

    CustomJS(code='''
        export default (args, obj, {ctx, i, r, visuals}) => {
            const path = new Path2D()
            path.arc(0, 0, r, 0, 2*Math.PI, false)
            return path
        }
    ''')
    
    • paint directly to an instance of Context2d:

    CustomJS(code='''
        export default (args, obj, {ctx, i, r, visuals}) => {
            ctx.arc(0, 0, r, 0, 2*Math.PI, false)
            visuals.fill.apply(ctx, i)
            visuals.hatch.apply(ctx, i)
            visuals.line.apply(ctx, i)
        }
    ''')
    

    Note

    Custom marker’s names must start with “@” prefix, e.g. “@my_marker”.

    Note

    Custom markers are only supported with "canvas" and "svg" backends. (default: {})

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the markers. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the markers. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the markers. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the markers. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the markers. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the markers.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the markers. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the markers. (default: 1.0)

  • hit_dilation (Size, optional) – The factor by which to dilate the hit radius which is responsible for defining the range in which a marker responds to interactions with the Hover and Tap tools. (default: 1.0)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the markers. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the markers. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the markers. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the markers. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the markers. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the markers. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the markers. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

step(*args, **kwargs)[source]

Configure and add Step glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates for the steps. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates for the steps. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • line_alpha (Alpha, optional) – The line alpha values for the steps. (default: 1.0)

  • line_cap (Enum(LineCap), optional) – The line cap values for the steps. (default: ‘butt’)

  • line_color (Nullable(Color), optional) – The line color values for the steps. (default: ‘black’)

  • line_dash (DashPattern) – The line dash values for the steps. (default: [])

  • line_dash_offset (Int) – The line dash offset values for the steps. (default: 0)

  • line_join (Enum(LineJoin), optional) – The line join values for the steps. (default: ‘bevel’)

  • line_width (Float, optional) – The line width values for the steps. (default: 1)

  • mode (Enum(StepMode), optional) –

    Where the step “level” should be drawn in relation to the x and y coordinates. The parameter can assume one of three values:

    • before: (default) Draw step levels before each x-coordinate (no step before the first point)

    • after: Draw step levels after each x-coordinate (no step after the last point)

    • center: Draw step levels centered on each x-coordinate (default: ‘before’)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

tex_glyph(*args, **kwargs)[source]

Configure and add TeXGlyph glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates to locate the text anchors. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates to locate the text anchors. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • text (StringSpec, optional) – The text values to render. (default: Field(field=’text’, transform=Unspecified, units=Unspecified))

  • angle (AngleSpec) – The angles to rotate the text, as measured from the horizontal. (default: 0)

  • x_offset (FloatSpec) –

    Offset values in pixels to apply to the x-coordinates.

    This is useful, for instance, if it is desired to “float” text a fixed distance in |screen units| from a given data position. (default: 0)

  • y_offset (FloatSpec) –

    Offset values in pixels to apply to the y-coordinates.

    This is useful, for instance, if it is desired to “float” text a fixed distance in |screen units| from a given data position. (default: 0)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • anchor (DataSpec, optional) –

    Position within the bounding box of this glyph to which x and y coordinates are anchored to. This can be a named anchor point like top_left or center, or a percentage from from left to right and top to bottom, or a combination of those, independently in width and height. If set to auto, then anchor point will be determined from text align and baseline.

    Note

    This property is experimental and may change at any point. (default: Value(value=’auto’, transform=Unspecified, units=Unspecified))

  • angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • background_fill_alpha (AlphaSpec, optional) – The fill alpha values for the text bounding box. (default: 1.0)

  • background_fill_color (ColorSpec) – The fill color values for the text bounding box.

  • background_hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the text bounding box. (default: 1.0)

  • background_hatch_color (ColorSpec) – The hatch color values for the text bounding box.

  • background_hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the text bounding box. (default: {})

  • background_hatch_pattern (HatchPatternSpec) – The hatch pattern values for the text bounding box.

  • background_hatch_scale (FloatSpec, optional) – The hatch scale values for the text bounding box. (default: 12.0)

  • background_hatch_weight (FloatSpec, optional) – The hatch weight values for the text bounding box. (default: 1.0)

  • border_line_alpha (AlphaSpec, optional) – The line alpha values for the text bounding box. (default: 1.0)

  • border_line_cap (LineCapSpec, optional) – The line cap values for the text bounding box. (default: ‘butt’)

  • border_line_color (ColorSpec) – The line color values for the text bounding box.

  • border_line_dash (DashPatternSpec) – The line dash values for the text bounding box. (default: [])

  • border_line_dash_offset (IntSpec) – The line dash offset values for the text bounding box. (default: 0)

  • border_line_join (LineJoinSpec, optional) – The line join values for the text bounding box. (default: ‘bevel’)

  • border_line_width (FloatSpec, optional) – The line width values for the text bounding box. (default: 1)

  • border_radius (Either(NonNegative, Tuple(NonNegative, NonNegative, NonNegative, NonNegative), Struct)) –

    Allows the box to have rounded corners. For the best results, it should be used in combination with padding.

    Note

    This property is experimental and may change at any point. (default: 0)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • display (Enum(Enumeration(inline, block, auto)), optional) –

    Defines how the text is interpreted and what TeX display mode to use.

    The following values are allowed:

    • "auto" (the default) The text is parsed, requiring TeX delimiters to enclose math content, e.g. "$$x^2$$" or r"\[\frac{x}{y}\]". This allows mixed math text and regular text content. TeX display mode is inferred by the parser.

    • "block" The text is taken verbatim and TeX’s block mode is used.

    • "inline" The text is taken verbatim and TeX’s inline mode is used. (default: ‘auto’)

  • macros (Dict(String, Either(String, Tuple(String, Int)))) –

    User defined TeX macros.

    This is a mapping from control sequence names (without leading backslash) to either replacement strings or tuples of a replacement string and a number of arguments.

    Example:

    TeX(text=r"\R \rightarrow \R^2", macros={"RR": r"{\bf R}"}) (default: {})
    

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • outline_shape (DataSpec, optional) –

    Specify the shape of the outline for the text box.

    The default outline is of a text box is its bounding box (or rectangle). This can be changed to a selection of pre-defined shapes, like circle, ellipse, diamond, parallelogram, etc. Those shapes are circumscribed onto the bounding box, so that the contents of a box fit inside those shapes.

    This property is in effect only when either border line, background fill and/or background hatch properties are set. The user can choose "none" to avoid drawing any shape, even if border or background visuals are set.

    Note

    This property is experimental and may change at any point.

    Note

    Currently hit testing only uses the bounding box of text contents of the glyph, which is equivalent to using box/rectangle shape. (default: ‘box’)

  • padding (Either(NonNegative, Tuple(NonNegative, NonNegative), Struct, Tuple(NonNegative, NonNegative, NonNegative, NonNegative), Struct)) –

    Extra space between the text of a glyphs and its bounding box (border).

    Note

    This property is experimental and may change at any point. (default: 0)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

  • text_align (TextAlignSpec, optional) – The text align values for the text. (default: ‘left’)

  • text_alpha (AlphaSpec, optional) – The text alpha values for the text. (default: 1.0)

  • text_baseline (TextBaselineSpec, optional) – The text baseline values for the text. (default: ‘bottom’)

  • text_color (ColorSpec, optional) – The text color values for the text. (default: ‘#444444’)

  • text_font (StringSpec, optional) – The text font values for the text. (default: Value(value=’helvetica’, transform=Unspecified, units=Unspecified))

  • text_font_size (FontSizeSpec, optional) – The text font size values for the text. (default: Value(value=’16px’, transform=Unspecified, units=Unspecified))

  • text_font_style (FontStyleSpec, optional) – The text font style values for the text. (default: ‘normal’)

  • text_line_height (NumberSpec, optional) – The text line height values for the text. (default: 1.2)

  • text_outline_color (ColorSpec) – The text outline color values for the text.

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

text(*args, **kwargs)[source]

Configure and add Text glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates to locate the text anchors. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates to locate the text anchors. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • text (StringSpec, optional) – The text values to render. (default: Field(field=’text’, transform=Unspecified, units=Unspecified))

  • angle (AngleSpec) – The angles to rotate the text, as measured from the horizontal. (default: 0)

  • x_offset (FloatSpec) –

    Offset values in pixels to apply to the x-coordinates.

    This is useful, for instance, if it is desired to “float” text a fixed distance in |screen units| from a given data position. (default: 0)

  • y_offset (FloatSpec) –

    Offset values in pixels to apply to the y-coordinates.

    This is useful, for instance, if it is desired to “float” text a fixed distance in |screen units| from a given data position. (default: 0)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • anchor (DataSpec, optional) –

    Position within the bounding box of this glyph to which x and y coordinates are anchored to. This can be a named anchor point like top_left or center, or a percentage from from left to right and top to bottom, or a combination of those, independently in width and height. If set to auto, then anchor point will be determined from text align and baseline.

    Note

    This property is experimental and may change at any point. (default: Value(value=’auto’, transform=Unspecified, units=Unspecified))

  • angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • background_fill_alpha (AlphaSpec, optional) – The fill alpha values for the text bounding box. (default: 1.0)

  • background_fill_color (ColorSpec) – The fill color values for the text bounding box.

  • background_hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the text bounding box. (default: 1.0)

  • background_hatch_color (ColorSpec) – The hatch color values for the text bounding box.

  • background_hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the text bounding box. (default: {})

  • background_hatch_pattern (HatchPatternSpec) – The hatch pattern values for the text bounding box.

  • background_hatch_scale (FloatSpec, optional) – The hatch scale values for the text bounding box. (default: 12.0)

  • background_hatch_weight (FloatSpec, optional) – The hatch weight values for the text bounding box. (default: 1.0)

  • border_line_alpha (AlphaSpec, optional) – The line alpha values for the text bounding box. (default: 1.0)

  • border_line_cap (LineCapSpec, optional) – The line cap values for the text bounding box. (default: ‘butt’)

  • border_line_color (ColorSpec) – The line color values for the text bounding box.

  • border_line_dash (DashPatternSpec) – The line dash values for the text bounding box. (default: [])

  • border_line_dash_offset (IntSpec) – The line dash offset values for the text bounding box. (default: 0)

  • border_line_join (LineJoinSpec, optional) – The line join values for the text bounding box. (default: ‘bevel’)

  • border_line_width (FloatSpec, optional) – The line width values for the text bounding box. (default: 1)

  • border_radius (Either(NonNegative, Tuple(NonNegative, NonNegative, NonNegative, NonNegative), Struct)) –

    Allows the box to have rounded corners. For the best results, it should be used in combination with padding.

    Note

    This property is experimental and may change at any point. (default: 0)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • outline_shape (DataSpec, optional) –

    Specify the shape of the outline for the text box.

    The default outline is of a text box is its bounding box (or rectangle). This can be changed to a selection of pre-defined shapes, like circle, ellipse, diamond, parallelogram, etc. Those shapes are circumscribed onto the bounding box, so that the contents of a box fit inside those shapes.

    This property is in effect only when either border line, background fill and/or background hatch properties are set. The user can choose "none" to avoid drawing any shape, even if border or background visuals are set.

    Note

    This property is experimental and may change at any point.

    Note

    Currently hit testing only uses the bounding box of text contents of the glyph, which is equivalent to using box/rectangle shape. (default: ‘box’)

  • padding (Either(NonNegative, Tuple(NonNegative, NonNegative), Struct, Tuple(NonNegative, NonNegative, NonNegative, NonNegative), Struct)) –

    Extra space between the text of a glyphs and its bounding box (border).

    Note

    This property is experimental and may change at any point. (default: 0)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

  • text_align (TextAlignSpec, optional) – The text align values for the text. (default: ‘left’)

  • text_alpha (AlphaSpec, optional) – The text alpha values for the text. (default: 1.0)

  • text_baseline (TextBaselineSpec, optional) – The text baseline values for the text. (default: ‘bottom’)

  • text_color (ColorSpec, optional) – The text color values for the text. (default: ‘#444444’)

  • text_font (StringSpec, optional) – The text font values for the text. (default: Value(value=’helvetica’, transform=Unspecified, units=Unspecified))

  • text_font_size (FontSizeSpec, optional) – The text font size values for the text. (default: Value(value=’16px’, transform=Unspecified, units=Unspecified))

  • text_font_style (FontStyleSpec, optional) – The text font style values for the text. (default: ‘normal’)

  • text_line_height (NumberSpec, optional) – The text line height values for the text. (default: 1.2)

  • text_outline_color (ColorSpec) – The text outline color values for the text.

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

wedge(*args, **kwargs)[source]

Configure and add Wedge glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates of the points of the wedges. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates of the points of the wedges. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • radius (DistanceSpec, optional) – Radii of the wedges. (default: Field(field=’radius’, transform=Unspecified, units=Unspecified))

  • start_angle (AngleSpec, optional) – The angles to start the wedges, as measured from the horizontal. (default: Field(field=’start_angle’, transform=Unspecified, units=Unspecified))

  • end_angle (AngleSpec, optional) – The angles to end the wedges, as measured from the horizontal. (default: Field(field=’end_angle’, transform=Unspecified, units=Unspecified))

  • direction (Enum(Direction), optional) – Which direction to stroke between the start and end angles. (default: ‘anticlock’)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • end_angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the wedges. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the wedges. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the wedges. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the wedges. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the wedges. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the wedges.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the wedges. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the wedges. (default: 1.0)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the wedges. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the wedges. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the wedges. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the wedges. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the wedges. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the wedges. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the wedges. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • radius_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • start_angle_units (NotSerialized(Enum(AngleUnits)), optional) – Units to use for the associated property: deg, rad, grad or turn (default: ‘rad’)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

varea(*args, **kwargs)[source]

Configure and add VArea glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates for the points of the area. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y1 (NumberSpec, optional) – The y-coordinates for the points of one side of the area. (default: Field(field=’y1’, transform=Unspecified, units=Unspecified))

  • y2 (NumberSpec, optional) – The y-coordinates for the points of the other side of the area. (default: Field(field=’y2’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (Alpha, optional) – The fill alpha values for the vertical directed area. (default: 1.0)

  • fill_color (Nullable(Color), optional) – The fill color values for the vertical directed area. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the vertical directed area. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the vertical directed area. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the vertical directed area. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the vertical directed area.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the vertical directed area. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the vertical directed area. (default: 1.0)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

varea_step(*args, **kwargs)[source]

Configure and add VAreaStep glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates for the points of the area. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • y1 (NumberSpec, optional) – The y-coordinates for the points of one side of the area. (default: Field(field=’y1’, transform=Unspecified, units=Unspecified))

  • y2 (NumberSpec, optional) – The y-coordinates for the points of the other side of the area. (default: Field(field=’y2’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (Alpha, optional) – The fill alpha values for the vertical directed area. (default: 1.0)

  • fill_color (Nullable(Color), optional) – The fill color values for the vertical directed area. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the vertical directed area. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the vertical directed area. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the vertical directed area. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the vertical directed area.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the vertical directed area. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the vertical directed area. (default: 1.0)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • step_mode (Enum(StepMode), optional) –

    Where the step “level” should be drawn in relation to the x and y coordinates. The parameter can assume one of three values:

    • before: (default) Draw step levels before each x-coordinate (no step before the first point)

    • after: Draw step levels after each x-coordinate (no step after the last point)

    • center: Draw step levels centered on each x-coordinate (default: ‘before’)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

vbar(*args, **kwargs)[source]

Configure and add VBar glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates of the centers of the vertical bars. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • width (DistanceSpec, optional) – The widths of the vertical bars. (default: 1)

  • top (NumberSpec, optional) – The y-coordinates of the top edges. (default: Field(field=’top’, transform=Unspecified, units=Unspecified))

  • bottom (NumberSpec) – The y-coordinates of the bottom edges. (default: 0)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • border_radius (Either(NonNegative, Tuple(NonNegative, NonNegative, NonNegative, NonNegative), Struct)) –

    Allows the box to have rounded corners.

    Note

    This property is experimental and may change at any point. (default: 0)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the vertical bars. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the vertical bars. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the vertical bars. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the vertical bars. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the vertical bars. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the vertical bars.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the vertical bars. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the vertical bars. (default: 1.0)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the vertical bars. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the vertical bars. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the vertical bars. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the vertical bars. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the vertical bars. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the vertical bars. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the vertical bars. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

  • width_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

vspan(*args, **kwargs)[source]

Configure and add VSpan glyphs to this figure.

Parameters:
  • x (NumberSpec, optional) – The x-coordinates of the spans. (default: Field(field=’x’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • line_alpha (AlphaSpec, optional) – The line alpha values for the spans. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the spans. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the spans. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the spans. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the spans. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the spans. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the spans. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

harea(*args, **kwargs)[source]

Configure and add HArea glyphs to this figure.

Parameters:
  • x1 (NumberSpec, optional) – The x-coordinates for the points of one side of the area. (default: Field(field=’x1’, transform=Unspecified, units=Unspecified))

  • x2 (NumberSpec, optional) – The x-coordinates for the points of the other side of the area. (default: Field(field=’x2’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates for the points of the area. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (Alpha, optional) – The fill alpha values for the horizontal directed area. (default: 1.0)

  • fill_color (Nullable(Color), optional) – The fill color values for the horizontal directed area. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the horizontal directed area. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the horizontal directed area. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the horizontal directed area. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the horizontal directed area.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the horizontal directed area. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the horizontal directed area. (default: 1.0)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

harea_step(*args, **kwargs)[source]

Configure and add HAreaStep glyphs to this figure.

Parameters:
  • x1 (NumberSpec, optional) – The x-coordinates for the points of one side of the area. (default: Field(field=’x1’, transform=Unspecified, units=Unspecified))

  • x2 (NumberSpec, optional) – The x-coordinates for the points of the other side of the area. (default: Field(field=’x2’, transform=Unspecified, units=Unspecified))

  • y (NumberSpec, optional) – The y-coordinates for the points of the area. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (Alpha, optional) – The fill alpha values for the horizontal directed area. (default: 1.0)

  • fill_color (Nullable(Color), optional) – The fill color values for the horizontal directed area. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the horizontal directed area. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the horizontal directed area. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the horizontal directed area. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the horizontal directed area.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the horizontal directed area. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the horizontal directed area. (default: 1.0)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • step_mode (Enum(StepMode), optional) –

    Where the step “level” should be drawn in relation to the x and y coordinates. The parameter can assume one of three values:

    • before: (default) Draw step levels before each y-coordinate (no step before the first point)

    • after: Draw step levels after each y-coordinate (no step after the last point)

    • center: Draw step levels centered on each y-coordinate (default: ‘before’)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

hbar(*args, **kwargs)[source]

Configure and add HBar glyphs to this figure.

Parameters:
  • y (NumberSpec, optional) – The y-coordinates of the centers of the horizontal bars. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • height (DistanceSpec, optional) – The heights of the vertical bars. (default: 1)

  • right (NumberSpec, optional) – The x-coordinates of the right edges. (default: Field(field=’right’, transform=Unspecified, units=Unspecified))

  • left (NumberSpec) – The x-coordinates of the left edges. (default: 0)

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • border_radius (Either(NonNegative, Tuple(NonNegative, NonNegative, NonNegative, NonNegative), Struct)) –

    Allows the box to have rounded corners.

    Note

    This property is experimental and may change at any point. (default: 0)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the horizontal bars. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the horizontal bars. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the horizontal bars. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the horizontal bars. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the horizontal bars. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the horizontal bars.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the horizontal bars. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the horizontal bars. (default: 1.0)

  • height_units (NotSerialized(Enum(SpatialUnits)), optional) – Units to use for the associated property: screen or data (default: ‘data’)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the horizontal bars. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the horizontal bars. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the horizontal bars. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the horizontal bars. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the horizontal bars. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the horizontal bars. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the horizontal bars. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

hspan(*args, **kwargs)[source]

Configure and add HSpan glyphs to this figure.

Parameters:
  • y (NumberSpec, optional) – The y-coordinates of the spans. (default: Field(field=’y’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • line_alpha (AlphaSpec, optional) – The line alpha values for the spans. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the spans. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the spans. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the spans. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the spans. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the spans. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the spans. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

bezier(*args, **kwargs)[source]

Configure and add Bezier glyphs to this figure.

Parameters:
  • x0 (NumberSpec, optional) – The x-coordinates of the starting points. (default: Field(field=’x0’, transform=Unspecified, units=Unspecified))

  • y0 (NumberSpec, optional) – The y-coordinates of the starting points. (default: Field(field=’y0’, transform=Unspecified, units=Unspecified))

  • x1 (NumberSpec, optional) – The x-coordinates of the ending points. (default: Field(field=’x1’, transform=Unspecified, units=Unspecified))

  • y1 (NumberSpec, optional) – The y-coordinates of the ending points. (default: Field(field=’y1’, transform=Unspecified, units=Unspecified))

  • cx0 (NumberSpec, optional) – The x-coordinates of first control points. (default: Field(field=’cx0’, transform=Unspecified, units=Unspecified))

  • cy0 (NumberSpec, optional) – The y-coordinates of first control points. (default: Field(field=’cy0’, transform=Unspecified, units=Unspecified))

  • cx1 (NumberSpec, optional) – The x-coordinates of second control points. (default: Field(field=’cx1’, transform=Unspecified, units=Unspecified))

  • cy1 (NumberSpec, optional) – The y-coordinates of second control points. (default: Field(field=’cy1’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • line_alpha (AlphaSpec, optional) – The line alpha values for the Bezier curves. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the Bezier curves. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the Bezier curves. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the Bezier curves. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the Bezier curves. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the Bezier curves. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the Bezier curves. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

hstrip(*args, **kwargs)[source]

Configure and add HStrip glyphs to this figure.

Parameters:
  • y0 (NumberSpec, optional) – The y-coordinates of the coordinates of one side of the strips. (default: Field(field=’y0’, transform=Unspecified, units=Unspecified))

  • y1 (NumberSpec, optional) – The y-coordinates of the coordinates of the other side of the strips. (default: Field(field=’y1’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the strips. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the strips. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the strips. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the strips. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the strips. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the strips.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the strips. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the strips. (default: 1.0)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the strips. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the strips. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the strips. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the strips. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the strips. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the strips. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the strips. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

hextile(*args, **kwargs)[source]

Configure and add HexTile glyphs to this figure.

Parameters:
  • q (NumberSpec, optional) – The “column” axial coordinates of the tile centers. (default: Field(field=’q’, transform=Unspecified, units=Unspecified))

  • r (NumberSpec, optional) – The “row” axial coordinates of the tile centers. (default: Field(field=’r’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • aspect_scale (Float, optional) –

    Match a plot’s aspect ratio scaling.

    Use this parameter to match the aspect ratio scaling of a plot when using aspect_scale with a value other than 1.0. (default: 1.0)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the hex tiles. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the hex tiles. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the hex tiles. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the hex tiles. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the hex tiles. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the hex tiles.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the hex tiles. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the hex tiles. (default: 1.0)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the hex tiles. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the hex tiles. (default: ‘butt’)

  • line_color (ColorSpec) – The line color values for the hex tiles.

  • line_dash (DashPatternSpec) – The line dash values for the hex tiles. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the hex tiles. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the hex tiles. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the hex tiles. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • orientation (Enum(HexTileOrientation), optional) –

    The orientation of the hex tiles.

    Use "pointytop" to orient the tile so that a pointed corner is at the top. Use "flattop" to orient the tile so that a flat side is at the top. (default: ‘pointytop’)

  • scale (NumberSpec, optional) – A scale factor for individual tiles. (default: 1.0)

  • size (Float, optional) –

    The radius (in |data units|) of the hex tiling.

    The radius is always measured along the cartesian y-axis for “pointy_top” orientation, and along the cartesian x-axis for “flat_top” orientation. If the aspect ratio of the underlying cartesian system is not 1-1, then the tiles may be “squished” in one direction. To ensure that the tiles are always regular hexagons, consider setting the match_aspect property of the plot to True. (default: 1.0)

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

multi_line(*args, **kwargs)[source]

Configure and add MultiLine glyphs to this figure.

Parameters:
  • xs (NumberSpec, optional) – The x-coordinates for all the lines, given as a “list of lists”. (default: Field(field=’xs’, transform=Unspecified, units=Unspecified))

  • ys (NumberSpec, optional) – The y-coordinates for all the lines, given as a “list of lists”. (default: Field(field=’ys’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • line_alpha (AlphaSpec, optional) – The line alpha values for the lines. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the lines. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the lines. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the lines. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the lines. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the lines. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the lines. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

multipolygons(*args, **kwargs)[source]

Configure and add MultiPolygons glyphs to this figure.

Parameters:
  • xs (NumberSpec, optional) –

    The x-coordinates for all the patches, given as a nested list.

    Note

    Each item in MultiPolygons represents one MultiPolygon and each MultiPolygon is comprised of n Polygons. Each Polygon is made of one exterior ring optionally followed by m interior rings (holes). (default: Field(field=’xs’, transform=Unspecified, units=Unspecified))

  • ys (NumberSpec, optional) –

    The y-coordinates for all the patches, given as a “list of lists”.

    Note

    Each item in MultiPolygons represents one MultiPolygon and each MultiPolygon is comprised of n Polygons. Each Polygon is made of one exterior ring optionally followed by m interior rings (holes). (default: Field(field=’ys’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the multipolygons. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the multipolygons. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the multipolygons. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the multipolygons. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the multipolygons. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the multipolygons.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the multipolygons. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the multipolygons. (default: 1.0)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the multipolygons. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the multipolygons. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the multipolygons. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the multipolygons. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the multipolygons. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the multipolygons. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the multipolygons. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

patches(*args, **kwargs)[source]

Configure and add Patches glyphs to this figure.

Parameters:
  • xs (NumberSpec, optional) –

    The x-coordinates for all the patches, given as a “list of lists”.

    Note

    Individual patches may comprise multiple polygons. In this case the x-coordinates for each polygon should be separated by NaN values in the sublists. (default: Field(field=’xs’, transform=Unspecified, units=Unspecified))

  • ys (NumberSpec, optional) –

    The y-coordinates for all the patches, given as a “list of lists”.

    Note

    Individual patches may comprise multiple polygons. In this case the y-coordinates for each polygon should be separated by NaN values in the sublists. (default: Field(field=’ys’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the patches. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the patches. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the patches. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the patches. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the patches. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the patches.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the patches. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the patches. (default: 1.0)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the patches. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the patches. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the patches. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the patches. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the patches. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the patches. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the patches. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

quad(*args, **kwargs)[source]

Configure and add Quad glyphs to this figure.

Parameters:
  • left (NumberSpec, optional) – The x-coordinates of the left edges. (default: Field(field=’left’, transform=Unspecified, units=Unspecified))

  • right (NumberSpec, optional) – The x-coordinates of the right edges. (default: Field(field=’right’, transform=Unspecified, units=Unspecified))

  • top (NumberSpec, optional) – The y-coordinates of the top edges. (default: Field(field=’top’, transform=Unspecified, units=Unspecified))

  • bottom (NumberSpec, optional) – The y-coordinates of the bottom edges. (default: Field(field=’bottom’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • border_radius (Either(NonNegative, Tuple(NonNegative, NonNegative, NonNegative, NonNegative), Struct)) –

    Allows the box to have rounded corners.

    Note

    This property is experimental and may change at any point. (default: 0)

  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the quads. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the quads. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the quads. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the quads. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the quads. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the quads.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the quads. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the quads. (default: 1.0)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the quads. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the quads. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the quads. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the quads. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the quads. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the quads. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the quads. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

quadratic(*args, **kwargs)[source]

Configure and add Quadratic glyphs to this figure.

Parameters:
  • x0 (NumberSpec, optional) – The x-coordinates of the starting points. (default: Field(field=’x0’, transform=Unspecified, units=Unspecified))

  • y0 (NumberSpec, optional) – The y-coordinates of the starting points. (default: Field(field=’y0’, transform=Unspecified, units=Unspecified))

  • x1 (NumberSpec, optional) – The x-coordinates of the ending points. (default: Field(field=’x1’, transform=Unspecified, units=Unspecified))

  • y1 (NumberSpec, optional) – The y-coordinates of the ending points. (default: Field(field=’y1’, transform=Unspecified, units=Unspecified))

  • cx (NumberSpec, optional) – The x-coordinates of the control points. (default: Field(field=’cx’, transform=Unspecified, units=Unspecified))

  • cy (NumberSpec, optional) – The y-coordinates of the control points. (default: Field(field=’cy’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • line_alpha (AlphaSpec, optional) – The line alpha values for the parabolas. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the parabolas. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the parabolas. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the parabolas. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the parabolas. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the parabolas. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the parabolas. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

segment(*args, **kwargs)[source]

Configure and add Segment glyphs to this figure.

Parameters:
  • x0 (NumberSpec, optional) – The x-coordinates of the starting points. (default: Field(field=’x0’, transform=Unspecified, units=Unspecified))

  • y0 (NumberSpec, optional) – The y-coordinates of the starting points. (default: Field(field=’y0’, transform=Unspecified, units=Unspecified))

  • x1 (NumberSpec, optional) – The x-coordinates of the ending points. (default: Field(field=’x1’, transform=Unspecified, units=Unspecified))

  • y1 (NumberSpec, optional) – The y-coordinates of the ending points. (default: Field(field=’y1’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • line_alpha (AlphaSpec, optional) – The line alpha values for the segments. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the segments. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the segments. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the segments. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the segments. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the segments. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the segments. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

vstrip(*args, **kwargs)[source]

Configure and add VStrip glyphs to this figure.

Parameters:
  • x0 (NumberSpec, optional) – The x-coordinates of the coordinates of one side of the strips. (default: Field(field=’x0’, transform=Unspecified, units=Unspecified))

  • x1 (NumberSpec, optional) – The x-coordinates of the coordinates of the other side of the strips. (default: Field(field=’x1’, transform=Unspecified, units=Unspecified))

  • alpha (float, optional) –

    An alias to set all alpha keyword arguments at once. (default: None)

    Alpha values must be between 0 (fully transparent) and 1 (fully opaque).

    Any explicitly set values for line_alpha, etc. will override this setting.

  • color (color, optional) –

    An alias to set all color keyword arguments at once. (default: None)

    See ug_styling_colors in the user guide for different options to define colors.

    Any explicitly set values for line_color, etc. will override this setting.

  • legend_field (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in the browser. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in JavaScript, at the same time the Bokeh content is rendered in the browser. If the data is subsequently updated, the legend will automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_group (str, optional) –

    Specify that the glyph should produce multiple legend entries by grouping them in Python. The value of this parameter is the name of a column in the data source that should be used for the grouping.

    The grouping is performed in Python, before the Bokeh output is sent to a browser. If the date is subsequently updated, the legend will not automatically re-group.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied

  • legend_label (str, optional) –

    Specify that the glyph should produce a single basic legend label in the legend. The legend entry is labeled with the exact text supplied here.

    Note

    Only one of legend_field, legend_group, or legend_label should be supplied.

  • muted (bool, optional) –

    Whether the glyph should be rendered as muted (default: False)

    For this to be useful, an muted_glyph must be configured on the returned GlyphRender. This can be done by explicitly creating a Glyph to use, or more simply by passing e.g. muted_color, etc. to this glyph function.

  • name (str, optional) –

    An optional user-supplied name to attach to the renderer (default: None)

    Bokeh does not use this value in any way, but it may be useful for searching a Bokeh document to find a specific model.

  • source (ColumnDataSource, optional) –

    A user-supplied data source. (default: None)

    If not supplied, Bokeh will automatically construct an internal ColumnDataSource with default column names from the coordinates and other arguments that were passed-in as literal list or array values.

    If supplied, Bokeh will use the supplied data source to derive the glyph. In this case, literal list or arrays may not be used for coordinates or other arguments. Only singular fixed values (e.g. x=10) or column names in the data source (e.g. x="time") are permitted.

  • view (CDSView, optional) – A view for filtering the data source. (default: None)

  • visible (bool, optional) – Whether the glyph should be rendered. (default: True)

  • x_range_name (str, optional) –

    The name of an extra range to use for mapping x-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • y_range_name (str, optional) –

    The name of an extra range to use for mapping y-coordinates. (default: None)

    If not supplied, then the default y_range of the plot will be used for coordinate mapping.

  • level (RenderLevel, optional) – Specify the render level order for this glyph.

  • kwargs (Any)

Keyword Arguments:
  • decorations (List) –

    A collection of glyph decorations, e.g. arrow heads.

    Use GlyphRenderer.add_decoration() for easy setup for all glyphs of a glyph renderer. Use this property when finer control is needed.

    Note

    Decorations are only for aiding visual appearance of a glyph, but they don’t participate in hit testing, etc. (default: [])

  • fill_alpha (AlphaSpec, optional) – The fill alpha values for the strips. (default: 1.0)

  • fill_color (ColorSpec, optional) – The fill color values for the strips. (default: ‘gray’)

  • hatch_alpha (AlphaSpec, optional) – The hatch alpha values for the strips. (default: 1.0)

  • hatch_color (ColorSpec, optional) – The hatch color values for the strips. (default: ‘black’)

  • hatch_extra (Dict(String, Instance(‘bokeh.models.textures.Texture’))) – The hatch extra values for the strips. (default: {})

  • hatch_pattern (HatchPatternSpec) – The hatch pattern values for the strips.

  • hatch_scale (FloatSpec, optional) – The hatch scale values for the strips. (default: 12.0)

  • hatch_weight (FloatSpec, optional) – The hatch weight values for the strips. (default: 1.0)

  • line_alpha (AlphaSpec, optional) – The line alpha values for the strips. (default: 1.0)

  • line_cap (LineCapSpec, optional) – The line cap values for the strips. (default: ‘butt’)

  • line_color (ColorSpec, optional) – The line color values for the strips. (default: ‘black’)

  • line_dash (DashPatternSpec) – The line dash values for the strips. (default: [])

  • line_dash_offset (IntSpec) – The line dash offset values for the strips. (default: 0)

  • line_join (LineJoinSpec, optional) – The line join values for the strips. (default: ‘bevel’)

  • line_width (FloatSpec, optional) – The line width values for the strips. (default: 1)

  • name (Nullable(String)) –

    An arbitrary, user-supplied name for this model.

    This name can be useful when querying the document to retrieve specific Bokeh models.

    >>> plot.scatter([1,2,3], [4,5,6], name="temp")
    >>> plot.select(name="temp")
    [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
    

    Note

    No uniqueness guarantees or other conditions are enforced on any names that are provided, nor is the name used directly by Bokeh for any reason.

  • syncable (Bool, optional) –

    Indicates whether this model should be synchronized back to a Bokeh server when updated in a web browser. Setting to False may be useful to reduce network traffic when dealing with frequently updated objects whose updated values we don’t need.

    Note

    Setting this property to False will prevent any on_change() callbacks on this object from triggering. However, any JS-side callbacks will still work. (default: True)

  • tags (List) –

    An optional list of arbitrary, user-supplied values to attach to this model.

    This data can be useful when querying the document to retrieve specific Bokeh models:

    >>> r = plot.scatter([1,2,3], [4,5,6])
    >>> r.tags = ["foo", 10]
    >>> plot.select(tags=['foo', 10])
    [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
    

    Or simply a convenient way to attach any necessary metadata to a model that can be accessed by CustomJS callbacks, etc.

    Note

    No uniqueness guarantees or other conditions are enforced on any tags that are provided, nor are the tags used directly by Bokeh for any reason. (default: [])

Return type:

GlyphRenderer

It is also possible to set the color and alpha parameters of extra glyphs for selection, nonselection, hover, or muted. To do so, add the relevant prefix to any visual parameter. For example, pass nonselection_alpha to set the line and fill alpha for nonselect, or hover_fill_alpha to set the fill alpha for hover. See the ug_styling_plots_glyphs section of the user guide for full details.

Return type:

GlyphRenderer

Returns:

GlyphRenderer

Parameters:

kwargs (Any)

harea_stack(stackers, **kwargs)[source]

Stack horizontal filled areas between consecutive stacker columns.

Each stacker column is cumulated left-to-right: the running total before the current stacker becomes x1 and after becomes x2, producing one filled band per stacker.

Parameters:
  • stackers (Sequence[str]) – Column names to stack in order.

  • **kwargs (Any) – Visual properties forwarded to harea() (e.g. y, fill_color, fill_alpha).

Return type:

list[GlyphRenderer]

Returns:

One GlyphRenderer per stacker.

hbar_stack(stackers, **kwargs)[source]

Stack horizontal bars between consecutive stacker columns.

Each stacker column is cumulated left-to-right: the running total before the current stacker becomes left and after becomes right, producing one bar segment per stacker.

Parameters:
  • stackers (Sequence[str]) – Column names to stack in order.

  • **kwargs (Any) – Visual properties forwarded to hbar() (e.g. y, height, fill_color).

Return type:

list[GlyphRenderer]

Returns:

One GlyphRenderer per stacker.

hline_stack(stackers, **kwargs)[source]

Stack horizontal lines at the cumulative sum of each stacker column.

Each stacker column is cumulated left-to-right and the running total is used as the x coordinate, producing one line per stacker.

Parameters:
  • stackers (Sequence[str]) – Column names to stack in order.

  • **kwargs (Any) – Visual properties forwarded to line() (e.g. y, line_color, line_width).

Return type:

list[GlyphRenderer]

Returns:

One GlyphRenderer per stacker.

varea_stack(stackers, **kwargs)[source]

Stack vertical filled areas between consecutive stacker columns.

Each stacker column is cumulated bottom-to-top: the running total before the current stacker becomes y1 and after becomes y2, producing one filled band per stacker.

Parameters:
  • stackers (Sequence[str]) – Column names to stack in order.

  • **kwargs (Any) – Visual properties forwarded to varea() (e.g. x, fill_color, fill_alpha).

Return type:

list[GlyphRenderer]

Returns:

One GlyphRenderer per stacker.

vbar_stack(stackers, **kwargs)[source]

Stack vertical bars between consecutive stacker columns.

Each stacker column is cumulated bottom-to-top: the running total before the current stacker becomes bottom and after becomes top, producing one bar segment per stacker.

Parameters:
  • stackers (Sequence[str]) – Column names to stack in order.

  • **kwargs (Any) – Visual properties forwarded to vbar() (e.g. x, width, fill_color).

Return type:

list[GlyphRenderer]

Returns:

One GlyphRenderer per stacker.

vline_stack(stackers, **kwargs)[source]

Stack vertical lines at the cumulative sum of each stacker column.

Each stacker column is cumulated bottom-to-top and the running total is used as the y coordinate, producing one line per stacker.

Parameters:
  • stackers (Sequence[str]) – Column names to stack in order.

  • **kwargs (Any) – Visual properties forwarded to line() (e.g. x, line_color, line_width).

Return type:

list[GlyphRenderer]

Returns:

One GlyphRenderer per stacker.

class xpectral.charts.accessors.PolarsBokehAccessor(df)[source]

Bases: BokehAccessor

property source: ColumnDataSource
class xpectral.charts.accessors.PandasBokehAccessor(df)[source]

Bases: BokehAccessor

property source: ColumnDataSource
class xpectral.charts._figure.Figure(*arg, **kwargs)[source]

Bases: Plot

property plot
property coordinates

Central theme management for Bokeh apps.

class xpectral.charts.theme_manager.ThemeAccessor(default='light')[source]

Bases: object

Small accessor around a named collection of Bokeh themes.

Parameters:

default (str)

property name: str
property current
set(name)[source]
Return type:

None

Parameters:

name (str)