show

show(
    plot=None
    renderer='auto'
    clear_fig=True
    use_cdn=None
    *
    hover_mode=None
)

Display a MAIDR plot.

Parameters

Name Type Description Default
plot Any or None The plot object to display. Supports matplotlib/seaborn artists, Plotly figures, Bokeh figures and layouts, plotnine ggplot objects, and Altair chart objects. If None, uses the current matplotlib figure. None
renderer ('auto', 'ipython', 'browser') The renderer to use for display. "auto"
clear_fig bool Whether to clear the figure after displaying. True
use_cdn bool, {"auto"}, or None See :func:render for the three possible modes. None defers to :func:get_use_cdn (the process-wide default). The two CDN modes (True and "auto") resolve the published version over the network once per process when building the URL, bounded by MAIDR_CDN_TIMEOUT; MAIDR_CDN_VERSION skips it. False makes no request. Altair charts always use the CDN — this argument is not plumbed through that adapter. None
hover_mode ('pointermove', 'click', 'off') The chart’s starting hover mode, written to the schema as hoverMode. See :func:render for the values. None leaves it out; Altair charts warn and ignore it. "pointermove"

Returns

Name Type Description
object The display result.

Raises

Name Type Description
ValueError If hover_mode is not one of the values :func:render lists.

Notes

In Pyodide with no page – a web worker, or Node.js – there is nowhere to show the chart, whatever renderer says. This warns instead and leaves the figure open, so :func:render can still give its HTML to the page.