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

Delete toolbar by default before exporting the image #4422

Merged
merged 2 commits into from
Jun 7, 2020

Conversation

alexbraditsas
Copy link
Contributor

This pull request refers to issue #3751

I created a new branch so that the review of the pr is easier, sorry for the other pr! Every comment or guideline in order to make the pr successful is more than welcome. Thanks in advance!

@@ -782,6 +782,8 @@ def save(obj, filename, fmt='auto', backend=None, resources='cdn', **kwargs):
Additional keyword arguments passed to the renderer,
e.g. fps for animations
"""
if toolbar is None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if toolbar is None:
if (backend == 'bokeh' or (backend is None and Store.current_backend == 'bokeh')) and toolbar is None:

@@ -782,6 +782,8 @@ def save(obj, filename, fmt='auto', backend=None, resources='cdn', **kwargs):
Additional keyword arguments passed to the renderer,
e.g. fps for animations
"""
if toolbar is None:
obj.options(toolbar=None)
Copy link
Member

@philippjfr philippjfr May 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
obj.options(toolbar=None)
obj = obj.opts(toolbar=None, backend='bokeh', clone=True)

@@ -828,6 +830,8 @@ def render(obj, backend=None, **kwargs):
The rendered representation of the HoloViews object, e.g.
if backend='matplotlib' a matplotlib Figure or FuncAnimation
"""
if toolbar is None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if toolbar is None:
if (backend == 'bokeh' or (backend is None and Store.current_backend == 'bokeh')) and toolbar is None:

@@ -828,6 +830,8 @@ def render(obj, backend=None, **kwargs):
The rendered representation of the HoloViews object, e.g.
if backend='matplotlib' a matplotlib Figure or FuncAnimation
"""
if toolbar is None:
obj.options(toolbar=None)
Copy link
Member

@philippjfr philippjfr May 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
obj.options(toolbar=None)
obj = obj.opts(toolbar=None, backend='bokeh', clone=True)

@philippjfr
Copy link
Member

Thanks @alexbraditsas!

@philippjfr philippjfr merged commit 95c91d0 into holoviz:master Jun 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants