matplotlib/matplotlib — Issue #587: Mac OS X version of matplotlib v1.1.0
Author: rayosborn
Created: 2011-11-14 16:20:27+00:00
State: open

I have just installed Matplotlib 1.1.0 over my Enthought 7.1 distribution (64-bit Mac OS X), and found that I had to edit axes.py to get my plots to appear. Originally, I was going to file a bug report about the error (for context, I've kept it in the post below), but then I checked the latest dev versions and found that it was fixed. In fact, the new version seems to be in the 1.1.0 tagged zip file just uploaded. The reason I am still posting an issue is that the version I installed was from the dmg file for v1.1.0 downloaded from the official matplotlib site (although I had to hack the package installer to put it in the Enthought distribution). I downloaded the dmg file over the weekend.

So the potential issue is that the official 1.1.0 release on the matplotlib site doesn't seem to match what was in the recently tagged file.

Original Post
------------------
Specifically, the error is in line 830 (Axes.cla module).

/Library/Frameworks/EPD64.framework/Versions/Current/lib/python2.7/site-packages/matplotlib/axes.py in cla(self)
828
829 self.ignore_existing_data_limits = True
--> 830 self.callbacks = cbook.CallbackRegistry()
831
832 if self._sharex is not None:

TypeError: __init__() takes exactly 2 arguments (1 given)

Editing this to:

self.callbacks = cbook.CallbackRegistry(('xlim_changed','ylim_changed'))

makes it work again. I see that the error seems to have resulted from a discussion in #384 about removing the need for a fixed set of signal names in the CallbackRegistry.