Closed euskov closed 5 years ago
Thanks for reporting this. Does it still work with a different renderer, e.g. GTK or Qt?
How can I set these renderers? The only renderers I can find from the code are matplotlib, bokeh and plotpy:
_backends = {'matplotlib': 'mpl',
'bokeh': 'bokeh',
'plotly': 'plotly'}
I guess that other renderers should work because all code which is related to this problem is located inside holoviews/plotting/mpl package.
Sorry should have been clearer and I actually meant matplotlib backends in particular, see here for a primer on that. That said this is definitely a bug and should be fixed, I just wanted to see whether it affects all GUI backends or just Tk.
For some reason it was quite a challenge to build these backends from sources. I only succeeded with building Qt4Agg, and this backend successfully renders the image without errors.
Glad it is now working!
@philippjfr Do you think there is anything we can do about this or should we just close the issue under the assumption that this is an occasionally issue with the Tk backend which isn't usually the default?
Not sure, let's leave it open until someone has had time to investigate.
Have not been able to reproduce.
Reopening, someone reported the same issue here: https://github.com/pydata/xarray/issues/2030
The solution here is simply to switch to agg, so I'll close again.
The following code sample raises
for matplotlib >= 2.0:
The exception is raised by the following line in site-packages/matplotlib/figure.py:
which calls Tk geometry command on closed figure with destroyed Tk handle (figure is closed at the end of _finalize_axis(self, key) method in site-packages/holoviews/plotting/mpl/plot.py).
Furthermore, the above code sample works fine for matplotlib 1.5. It seems that _set_dpi method changed slightly in 2.0, and one of the changes is Tk geometry call.