Hi,
I have tried to follow the wiki on mpl3d and fails to get anything working.
First there is a minor typo I think in the first example as the text reads:
(http://www.scipy.org/Wiki/Cookbook/Matplotlib/mplot3D)
import mpl3d.mplot3D as p3
and should be I think
import mpl3d.mplot3d as p3
with a small 'd'.
But anyway I get nothing when trying to use test1 (a figure plot is opening but that's all).
I do simply:
import mpl3d from mpl3d import mplot3d
mplot3d.test1()
Nothing happens except a figure opens.
When I go with the mouse over the figure I get:
/usr/lib/python2.4/site-packages/matplotlib/backend_bases.py in mouse_move(self, event)
1125 if event.inaxes and event.inaxes.get_navigate():
1126
-> 1127 try: s = event.inaxes.format_coord(event.xdata, event.ydata)
1128 except ValueError: pass
1129 except OverflowError: pass
/usr/lib/python2.4/site-packages/mpl3d/mplot3d.py in format_coord(self, xd, yd)
1073 """
1074 p = (xd,yd)
-> 1075 edges = self.tunit_edges()
1076 #lines = [proj3d.line2d(p0,p1) for (p0,p1) in edges]
1077 ldists = [(proj3d.line2d_seg_dist(p0,p1,p),i) for i,(p0,p1) in enumerate(edges)]
/usr/lib/python2.4/site-packages/mpl3d/mplot3d.py in tunit_edges(self, vals, M)
684
685 def tunit_edges(self, vals=None,M=None):
--> 686 tc = self.tunit_cube(vals,M)
687 edges = [(tc[0],tc[1]),
688 (tc[1],tc[2]),
/usr/lib/python2.4/site-packages/mpl3d/mplot3d.py in tunit_cube(self, vals, M)
678
679 def tunit_cube(self,vals=None,M=None):
--> 680 if M is None: M = self.M
681 xyzs = self.unit_cube(vals)
682 tcube = proj3d.proj_points(xyzs,M)
AttributeError: Axes3D instance has no attribute 'M'
....
Similar problems when trying the other posted examples.
My config is:
···
=========
loaded rc file /home/emsellem/.matplotlib/matplotlibrc
matplotlib version 0.87.2
verbose.level helpful
interactive is False
platform is linux2
numerix numpy 0.9.7.2341
font search path ['/usr/lib/python2.4/site-packages/matplotlib/mpl-data']
loaded ttfcache file /home/emsellem/.matplotlib/ttffont.cache
matplotlib data path /usr/lib/python2.4/site-packages/matplotlib/mpl-data
backend GTKAgg version 2.8.0
Python 2.4.1 (#1, Sep 13 2005, 00:39:20)
Type "copyright", "credits" or "license" for more information.
IPython 0.7.0 -- An enhanced Interactive Python.
Thanks for any tip on this,
Eric