hvplot.save#
- hvplot.save(obj, filename, fmt='auto', backend=None, resources='cdn', toolbar=None, title=None, **kwargs)[source]#
Saves the supplied object to file.
This function delegates saving to
holoviews.util.save()
when the object is a HoloViews element, which is the type of object mostly created by hvPlot. This function inherits the same signature and docstring below. However, in some cases hvPlot creates Panel objects, in which case saving is delegated to the method panel.io.Viewable.save. It shares a few common parameters with holoviews.util.save, and extra parameters can be passed as kwargs.The available output formats depend on the backend being used. By default and if the filename is a string the output format will be inferred from the file extension. Otherwise an explicit format will need to be specified. For ambiguous file extensions such as html it may be necessary to specify an explicit fmt to override the default, e.g. in the case of ‘html’ output the widgets will default to fmt=’widgets’, which may be changed to scrubber widgets using fmt=’scrubber’.
- Parameters:
- obj: HoloViews object
The HoloViews object to save to file
- filename: str or IO object
The filename or BytesIO/StringIO object to save to
- fmt: str
The format to save the object as, e.g. png, svg, html, or gif and if widgets are desired either ‘widgets’ or ‘scrubber’
- backend: str
A valid HoloViews rendering backend, e.g. bokeh or matplotlib
- resources: str or bokeh.resource.Resources
Bokeh resources used to load bokehJS components. Defaults to CDN, to embed resources inline for offline usage use ‘inline’ or bokeh.resources.INLINE.
- toolbar: bool or None
Whether to include toolbars in the exported plot. If None, display the toolbar unless fmt is png and backend is bokeh. If True, always include the toolbar. If False, do not include the toolbar.
- title: str
Custom title for exported HTML file
- **kwargs: dict
Additional keyword arguments passed to the renderer, e.g. fps for animations