Avoiding <matplotlib.figure.Figure at ......>
See original GitHub issueI’m working with IPython notebook on a server over ssh. In order to avoid the error:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/holoviews/ipython/display_hooks.py", line 203, in wrapped
**kwargs)
File "/usr/local/lib/python2.7/dist-packages/holoviews/ipython/display_hooks.py", line 233, in element_display
**opts(element, get_plot_size(element, size)))()
File "/usr/local/lib/python2.7/dist-packages/holoviews/plotting/raster.py", line 34, in __init__
super(RasterPlot, self).__init__(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/holoviews/plotting/element.py", line 132, in __init__
uniform=uniform, **dict(params, **plot_opts))
File "/usr/local/lib/python2.7/dist-packages/holoviews/plotting/plot.py", line 114, in __init__
self.handles['axis'] = self._init_axis(axis)
File "/usr/local/lib/python2.7/dist-packages/holoviews/plotting/plot.py", line 248, in _init_axis
fig = plt.figure()
File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 435, in figure
**kwargs)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt4agg.py", line 47, in new_figure_manager
return new_figure_manager_given_figure(num, thisFig)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt4agg.py", line 54, in new_figure_manager_given_figure
canvas = FigureCanvasQTAgg(figure)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt4agg.py", line 72, in __init__
FigureCanvasQT.__init__(self, figure)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt4.py", line 68, in __init__
_create_qApp()
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt5.py", line 138, in _create_qApp
raise RuntimeError('Invalid DISPLAY variable')
RuntimeError: Invalid DISPLAY variable
One must evaluate
%matplotlib inline
This always results in <matplotlib.figure.Figure at 0x7fb61b7849d0>
being under a HoloMap
Of course normally this won’t be an issue, but I’m using a HoloMap in a IPython presentation that I’m preparing. Would you know a way to get rid of this?
Issue Analytics
- State:
- Created 8 years ago
- Comments:26 (24 by maintainers)
Top Results From Across the Web
Avoiding <matplotlib.figure.Figure at 0xeafea58>
In the IPython console, the best way to make sure figures show up (without explicitly calling plt.show() ) is to use %matplotlib mode....
Read more >Avoiding <matplotlib.figure.Figure at ......> #68 - GitHub
I'm working with IPython notebook on a server over ssh. In order to avoid the error: Traceback (most recent call last): File ...
Read more >matplotlib.figure — Matplotlib 3.6.2 documentation
The layout mechanism for positioning of plot elements to avoid overlapping Axes decorations (labels, ticks, etc). Note that layout managers can have ...
Read more >matplotlib.pyplot.figure — Matplotlib 3.6.2 documentation
The layout mechanism for positioning of plot elements to avoid overlapping Axes decorations (labels, ticks, etc). Note that layout managers can measurably ...
Read more >matplotlib.figure.Figure — Matplotlib 3.3.4 documentation
Figure (figsize=None, dpi=None, facecolor=None, edgecolor=None, ... Values above 95 should be avoided; 100 disables portions of the JPEG ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes this one is pretty annoying. We recommend always using the ‘agg’ backend. You can either specify the backend in your matplotlibrc file or do it in the notebook using:
It helped me.Thanks.