Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hv.save for png images #4304

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion holoviews/plotting/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,6 @@ def save(self_or_cls, obj, basename, fmt='auto', key={}, info={},

with StoreOptions.options(obj, options, **kwargs):
plot, fmt = self_or_cls._validate(obj, fmt)

if isinstance(plot, Viewable):
from bokeh.resources import CDN, INLINE, Resources
if isinstance(resources, Resources):
Expand All @@ -529,6 +528,9 @@ def save(self_or_cls, obj, basename, fmt='auto', key={}, info={},
resources = CDN
elif resources.lower() == 'inline':
resources = INLINE
if fmt not in ["html", "png", "auto"]:
raise ValueError("Format for exporting panel not supported: %s" % fmt)
basename = basename if fmt == "auto" else "%s.%s" % (basename, fmt)
philippjfr marked this conversation as resolved.
Show resolved Hide resolved
plot.layout.save(basename, embed=True, resources=resources)
return

Expand Down