holoviews.plotting.bokeh.renderer module#
- class holoviews.plotting.bokeh.renderer.BokehRenderer(*, theme, webgl, backend, center, css, dpi, fig, fps, holomap, mode, post_render_hooks, size, widget_location, widget_mode, info_fn, key_fn, name)[source]#
Bases:
Renderer
Parameter Definitions
Parameters inherited from:
holoviews.plotting.renderer.Renderer
: key_fn, info_fn, center, dpi, fps, mode, size, widget_location, widget_mode, css, post_render_hooksbackend = String(default='bokeh', label='Backend')
The backend name.
fig = Selector(default='auto', label='Fig', names={}, objects=['html', 'json', 'auto', 'png'])
Output render format for static figures. If None, no figure rendering will occur.
holomap = Selector(default='auto', label='Holomap', names={}, objects=['widgets', 'scrubber', None, 'gif', 'auto'])
Output render multi-frame (typically animated) format. If None, no multi-frame rendering will occur.
theme = ClassSelector(allow_None=True, class_=(<class 'bokeh.themes.theme.Theme'>, <class 'str'>), default=<bokeh.themes.theme.Theme object at 0x11a1f9550>, label='Theme')
The applicable Bokeh Theme object (if any).
webgl = Boolean(default=True, label='Webgl')
Whether to render plots with WebGL if available
- get_plot(obj, doc=None, renderer=None, **kwargs)[source]#
Given a HoloViews Viewable return a corresponding plot instance. Allows supplying a document attach the plot to, useful when combining the bokeh model with another plot.
- get_size(plot)[source]#
Return the display size associated with a plot before rendering to any particular format. Used to generate appropriate HTML display.
Returns a tuple of (width, height) in pixels.
- classmethod load_nb(inline=True)[source]#
Loads any resources required for display of plots in the Jupyter notebook
- classmethod plot_options(obj, percent_size)[source]#
Given a holoviews object and a percentage size, apply heuristics to compute a suitable figure size. For instance, scaling layouts and grids linearly can result in unwieldy figure sizes when there are a large number of elements. As ad hoc heuristics are used, this functionality is kept separate from the plotting classes themselves.
Used by the IPython Notebook display hooks and the save utility. Note that this can be overridden explicitly per object using the fig_size and size plot options.