render

render(plot=None, use_cdn=None)

Render a MAIDR plot to HTML.

Parameters

Name Type Description Default
plot Any or None The plot object to render. Supports matplotlib/seaborn artists, Plotly figures, and Altair chart objects. If None, uses the current matplotlib figure. None
use_cdn bool, {"auto"}, or None * True: load maidr.js from the public jsDelivr CDN only (no offline fallback). * False: reference the copy bundled inside the installed maidr package. Use this in air-gapped environments. * "auto": emit a CDN <script> with a client-side onerror handler that swaps in the bundled copy when the CDN is unreachable. This is the default mode. Reachability is decided in the browser, but building the URL resolves the published version over the network once per process (bounded by MAIDR_CDN_TIMEOUT; set MAIDR_CDN_VERSION=latest to skip it). * None (default): use the process-wide default set via :func:set_use_cdn or the MAIDR_USE_CDN env var (both default to "auto"). Altair charts always use the CDN — this argument is not plumbed through that adapter, so False warns rather than taking effect (#521). None

Returns

Name Type Description
htmltools.Tag The rendered HTML representation of the plot.