Closed basnijholt closed 9 years ago
Does the code generate a traceback? Or does nothing happen at all?
It is difficult to diagnose what is going wrong without knowing what happens when you run the code mentioned above.
Yea I just checked and it's still working fine on my end and on the machine that builds the docs for us. I don't really think this is it, since I think matplotlib ships with the 3d toolkit now but could you try this import as well:
from mpl_toolkits.mplot3d import Axes3D
A traceback would be helpful too.
Ah, I thought it wouldn't work for anyone. But I tried on my own laptop and there it works.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/holoviews/ipython/display_hooks.py", line 212, in wrapped
**kwargs)
File "/usr/local/lib/python2.7/dist-packages/holoviews/ipython/display_hooks.py", line 241, in element_display
fig = Store.registry[element.__class__](element, **opts(element, size))()
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 132, in __init__
self.handles['axis'] = self._init_axis(axis)
File "/usr/local/lib/python2.7/dist-packages/holoviews/plotting/plot.py", line 289, in _init_axis
axis = fig.add_subplot(111, projection=self.projection)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/figure.py", line 964, in add_subplot
a = subplot_class_factory(projection_class)(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/axes/_subplots.py", line 78, in __init__
self._axes_class.__init__(self, fig, self.figbox, **kwargs)
File "/usr/lib/pymodules/python2.7/mpl_toolkits/mplot3d/axes3d.py", line 91, in __init__
*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 437, in __init__
self.cla()
File "/usr/lib/pymodules/python2.7/mpl_toolkits/mplot3d/axes3d.py", line 1045, in cla
Axes.cla(self)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 908, in cla
self.grid(self._gridOn, which=rcParams['axes.grid.which'])
File "/usr/lib/pymodules/python2.7/mpl_toolkits/mplot3d/axes3d.py", line 1256, in grid
self._draw_grid = maxes._string_to_bool(b)
AttributeError: 'module' object has no attribute '_string_to_bool'
:Surface [x,y] (z)
from mpl_toolkits.mplot3d import Axes3D
doesn't help.
Have a look at this Stackoverflow question.
Edit: It's probably caused by an old matplotlib version installed into the system site-packages, which is overriding the local version in your virtual environment. Try either deleting or renaming the system-wide matplotlib or simply renaming the mplot3d toolkit in the system mpl_toolkits.
Closing this as it is not a bug in HoloViews.
Of course, thanks, I'll try :)
I wonder if there is some way we could check matplotlib installs before people try to use HoloViews features. I realize this is fanciful but if we could tell users to try something like:
from holoviews.utils import test_matplotlib
test_matplotlib()
Then that would be a good way to know what is due to holoviews and what is due to the matplotlib install. Again, I realize this probably isn't feasible!
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I've tried
and
both don't work