-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Conversation
holoviews/util/__init__.py
Outdated
@@ -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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if toolbar is None: | |
if (backend == 'bokeh' or (backend is None and Store.current_backend == 'bokeh')) and toolbar is None: |
holoviews/util/__init__.py
Outdated
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
obj.options(toolbar=None) | |
obj = obj.opts(toolbar=None, backend='bokeh', clone=True) |
holoviews/util/__init__.py
Outdated
@@ -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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if toolbar is None: | |
if (backend == 'bokeh' or (backend is None and Store.current_backend == 'bokeh')) and toolbar is None: |
holoviews/util/__init__.py
Outdated
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
obj.options(toolbar=None) | |
obj = obj.opts(toolbar=None, backend='bokeh', clone=True) |
Thanks @alexbraditsas! |
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!