spacetelescope / imexam

imexam is a python tool for simple image examination, and plotting, with similar functionality to IRAF's imexamine
http://imexam.readthedocs.io
BSD 3-Clause "New" or "Revised" License
74 stars 45 forks source link

Deprecation error with matplotlib.pyplot.gca(projection='3d') #260

Open tran0923 opened 1 year ago

tran0923 commented 1 year ago

Per matplotlib's official documentation pyplot.gca will no longer accept keyword arguments.

For imexam, this breaks code like: ax = fig.gca(projection='3d') at line 1626 in imexamine.py.

One potential fix might be to use ax = fig.add_subplot(projection='3d') instead as suggested here.

This is only relevant for matplotlib version 3.4 and higher and can be avoided locally by using older versions.

asteroidnerd commented 1 year ago

This is in line 1628+1629 in my version? Fixed by replacing 1628 fig.add_subplot(111) 1629 ax = fig.gca(projection='3d') with 1628 ax = fig.add_subplot(111, projection='3d')