renderers#
Various kinds of renderers.
- class CompositeRenderer(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
A renderer that allows attaching other renderers and DOM-based UIs.
Note
This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.
- elements#
A collection of DOM-based UI elements attached to this renderer.
This can include floating elements like tooltips, allowing to establish a parent-child relationship between this renderer and its UI elements.
Note
This property is an equivalent of
Pane.elementsin DOM-based UIs.
- renderers#
A collection of renderers attached to this renderer.
Note
This property is experimental and may change at any point.
- class ContourRenderer(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
Renderer for contour plots composed of filled polygons and/or lines.
Rather than create these manually it is usually better to use
contour()instead.- construct_color_bar(**kwargs) ContourColorBar[source]#
Construct and return a new
ContourColorBarfor thisContourRenderer.The color bar will use the same fill, hatch and line visual properties as the ContourRenderer. Extra keyword arguments may be passed in to control
BaseColorBarproperties such as title.
- set_data(data: ContourData) None[source]#
Set the contour line and filled polygon data to render.
Accepts a
ContourDataobject, such as is returned fromcontour_data().
- fill_renderer#
Glyph renderer used for filled contour polygons.
- levels#
Levels at which the contours are calculated.
- line_renderer#
Glyph renderer used for contour lines.
- class DataRenderer(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
An abstract base class for data renderer types (e.g.
GlyphRenderer,GraphRenderer).Note
This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.
- class GlyphRenderer(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
-
- construct_color_bar(**kwargs: Any) ColorBar[source]#
Construct and return a new
ColorBarfor thisGlyphRenderer.The function will check for a color mapper on an appropriate property of the GlyphRenderer’s main glyph, in this order:
fill_color.transformfor FillGlyphline_color.transformfor LineGlyphtext_color.transformfor TextGlyphcolor_mapperfor Image
In general, the function will “do the right thing” based on glyph type. If different behavior is needed, ColorBars can be constructed by hand.
Extra keyword arguments may be passed in to control
ColorBarproperties such as title.- Returns:
ColorBar
- data_source#
Local data source to use when rendering glyphs on the plot.
- glyph#
The glyph to render, in conjunction with the supplied data source and ranges.
- hover_glyph#
An optional glyph used for inspected points, e.g., those that are being hovered over by a
HoverTool.
- muted#
Defines whether this glyph renderer is muted or not. Muted renderer will use the muted glyph instead of the primary glyph for rendering. Usually renderers are muted by the user through an UI action, e.g. by clicking a legend item, if a legend was configured with
click_policy = "mute".
- muted_glyph#
An optional glyph that replaces the primary glyph when
mutedis set. If set to"auto", it will create a new glyph based off the primary glyph with predefined visual properties.
- nonselection_glyph#
An optional glyph used for explicitly non-selected points (i.e., non-selected when there are other points that are selected, but not when no points at all are selected.)
If set to “auto” then a glyph with a low alpha value (0.1) will be used for non-selected points.
- selection_glyph#
An optional glyph used for selected points.
If set to “auto” then the standard glyph will be used for selected points.
- view#
A view into the data source to use when rendering glyphs. A default view of the entire data source is created when a view is not passed in during initialization.
- class GraphRenderer(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
- edge_renderer#
Instance of a
GlyphRenderercontaining anMultiLineGlyph that will be rendered as the graph edges.
- inspection_policy#
An instance of a
GraphHitTestPolicythat provides the logic for inspection of graph components.
- layout_provider#
An instance of a
LayoutProviderthat supplies the layout of the network graph in cartesian space.
- node_renderer#
Instance of a
GlyphRenderercontaining anXYGlyphthat will be rendered as the graph nodes.
- selection_policy#
An instance of a
GraphHitTestPolicythat provides the logic for selection of graph components.
- class GuideRenderer(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
- A base class for all guide renderer types.
GuideRendereris not generally useful to instantiate on its own.
Note
This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.
- A base class for all guide renderer types.
- class Renderer(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
An abstract base class for renderer types.
Note
This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.
A menu to display when user right clicks on the component.
Note
Use shift key when right clicking to display the native context menu.
- coordinates#
- group#
Note
This property is experimental and may change at any point.
- level#
Specifies the level in which to paint this renderer.
- propagate_hover#
Allows to propagate hover events to the parent renderer, frame or canvas.
Note
This property is experimental and may change at any point.
- visible#
Is the renderer visible.
- x_range_name#
A particular (named) x-range to use for computing screen locations when rendering glyphs on the plot. If unset, use the default x-range.
- y_range_name#
A particular (named) y-range to use for computing screen locations when rendering glyphs on the plot. If unset, use the default y-range.
- class RendererGroup(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
A collection of renderers.
- visible#
Makes all grouped renderers visible or not.
- class TileRenderer(*args: Any, id: ID | None = None, **kwargs: Any)[source]#
- alpha#
tile opacity 0.0 - 1.0
- render_parents#
Flag enable/disable drawing of parent tiles while waiting for new tiles to arrive. Default value is True.
- smoothing#
Enable image smoothing for the rendered tiles.
- tile_source#
Local data source to use when rendering glyphs on the plot.