I agree.
Here's more info (redundant?) regarding what I've tried, in case it clarifies. (Ultimately, I will obviously need to upgrade to 0.9, at which point I can report back on if this fixed the problem on my machine, but I can't do that until after the semester is over, mid May). I'm running MacPython 2.4.4. I've got matplotlib 0.87.7 w/TkAgg. I'm using IPython 0.7.4.svn.r2010, called with the -pylab flag. I'm running the tests reported here on a G5 (I've also seen them on a G4), using OS X 10.4.8.
In [2]: import matplotlib.axes3d as P3
In [3]: f = P.figure()
In [4]: ax = P3.Axes3D(f)
In [5]: ax.plot3d([1,2,3],[1,2,3],[1,2,3],'ro-')
In [6]: P.show()
···
On Apr 12, 2007, at 11:02 AM, Eric Firing wrote:
belinda thom wrote:
Me neither :-). I will try and get permission to upgrade axis.py w/my quick fix commenting out the kwargs in line 2131 of axes.py, as this is the quick option and I need something ASAP. You seem to know quite a bit about matplotlib. If you have any idea what this hack might break, I'd appreciate your insight so I know what to be wary of.
Your "fix" is rendering the scalex and scaley kwargs of Axes.plot ineffective, so that both axes will be autoscaled regardless of the value of these kwargs. It might have no practical consequence for what you are doing. The larger concern is that I can't figure out how making that change would be needed--the error message you show doesn't make sense to me, given what I see in the code, which means I don't understand something critical--and in fact this "fix" doesn't seem to be needed on my system. So, maybe this particular problem really has been fixed since 0.9, and Tim is referring to some other sort of problem in the 3d code. (I am simply assuming he is working from svn, but I don't know this for a fact.)
All very confusing and unsatisfactory.
---------------------------------------------------------------------------
exceptions.TypeError Traceback (most recent call last)
/Users/bthom/belinda/mills/aicourse/material/week12/lec/examples/<ipython console>
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes3d.py in plot3D(self, xs, ys, zs, *args, **kwargs)
488 def plot3D(self, xs, ys, zs, *args, **kwargs):
489 had_data = self.has_data()
--> 490 lines = Axes.plot(self, xs,ys, *args, **kwargs)
491 if len(lines)==1:
492 line = lines[0]
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py in plot(self, *args, **kwargs)
2129 lines = [line for line in lines] # consume the generator
2130
-> 2131 self.autoscale_view(scalex=scalex, scaley=scaley)
2132 #self.autoscale_view()#scalex=scalex, scaley=scaley)
2133 return lines
TypeError: autoscale_view() got an unexpected keyword argument 'scalex'
In [6]:
NOTE COMMENTED OUT LINE 2132. NOW I'LL DO THE SAME THING (FIRST RESTARTING IPYTHON) W/THE OTHER LINE COMMENTED OUT INSTEAD,
No error occurs and the figure plots as one would expect.
If there is anything else I can do to clear things up, please let me know.
I've got a list of other things that don't work the way I'd expect that I will post soon. Perhaps you can give me a link to where to find the changes made since 0.87.7 first, as I'm new to reading that kind of thing. Hopefully when Tim tries this stuff out on his end, we'll know more.
Thanks,
--b