Skip to content
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

AttributeError: 'AxesSubplot' object has no attribute '_hold' #11

Open
nvaytet opened this issue May 22, 2020 · 1 comment
Open

AttributeError: 'AxesSubplot' object has no attribute '_hold' #11

nvaytet opened this issue May 22, 2020 · 1 comment

Comments

@nvaytet
Copy link

nvaytet commented May 22, 2020

When trying to call imshow with Matplotlib3.0, I get

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-113-7e66688e4419> in <module>
     33 ax = fig.add_subplot(111)
---> 34 im = imshow(ax, z)
     35 cb = plt.colorbar(im)
     36 cb.ax.set_ylabel("Counts")

~/software/miniconda3/lib/python3.7/site-packages/modest_image/modest_image.py in imshow(axes, X, cmap, norm, aspect, interpolation, alpha, vmin, vmax, origin, extent, shape, filternorm, filterrad, imlim, resample, url, **kwargs)
    211     Unlike matplotlib version, must explicitly specify axes
    212     """
--> 213     if not axes._hold:
    214         axes.cla()
    215     if norm is not None:

AttributeError: 'AxesSubplot' object has no attribute '_hold'

Apparently, hold has been removed from Matplotlib: https://stackoverflow.com/questions/53957042/attributeerror-axessubplot-object-has-no-attribute-hold

@orena1
Copy link

orena1 commented Nov 30, 2020

This one: #12
Solves your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants