-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ImageGrid crashes when specifying axes class #3750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From quickly skimming the code in mpl_toolkit (which I have never really looked at before) I think the docstring needs to be updated. There is a tremendous amount of cool looking code there that we should probably do a through survey of.... attn @leejjoon |
@tacaswell - I feel like |
Even better. I was looking at the axis artist code, and realizing we have two implementations of Axes in the library, not at imagegrid. |
axes_grid toolkit has been tightly associated with the axis artist thing. Initially it only supported axis_artist.Axes. Later I added a support for matplotlib's original Axes, but I did it by implementing a wrapper class around original Axes (see mpl_axes.py). As @astrofrog already mentioned, we can modify the axes_grid code to support any derivatives of original Axes class. I still see some commented out code that was used to support original Axes, so this may not need a lot of effort. However, I suggest we leave the axis-artist-related code as it is since they are not fully compatible. Alternative way is to implement a factory function for mpl_axes.Axes (as is done for Subplot), and create a new subclass when required. I prefer this but this may just reflect my preference to the axis-artist. |
http://matplotlib.org/mpl_toolkits/axes_grid/ seems to provide some warning about this, but I am not sure how readily findable that page is (nor does it seem that |
The
ImageGrid
class claims to be able to work with anyAxes
sub-class, but this is not the case:The error is:
In fact, it looks like it might be expecting an AxisArtist instance. Should the docstring be updated, or should this be treated as a bug?
The text was updated successfully, but these errors were encountered: