Skip to content

Commit

Permalink
Fix hv.save as png images
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillemdb committed Mar 19, 2020
1 parent 69e931a commit 9a36732
Showing 1 changed file with 3 additions and 1 deletion.
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)
plot.layout.save(basename, embed=True, resources=resources)
return

Expand Down

0 comments on commit 9a36732

Please sign in to comment.