astroARIADNE icon indicating copy to clipboard operation
astroARIADNE copied to clipboard

SEDPlotter.plot_corner: AttributeError: 'XTick' object has no attribute 'label'

Open emilknudstrup opened this issue 1 year ago • 3 comments

Hi @jvines,

I just installed astroARIADNE and tried running through the example in the README, but got the following error when creating the corner plot:

AttributeError: 'XTick' object has no attribute 'label'

from line 1203 in plotter.py.

Not sure if it has something to do with the versions I have of matplotlib (3.8.2) or corner (2.2.2). Have you encountered this before?

In any case, I installed an editable version and changed label to label1 in lines 1203 and 1204 cf. this. It then changed to AttributeError: 'YTick' object has no attribute 'label', so I also changed it in lines 1173, 1174, 1183, and 1184. That seems to have solved the issue.

Thanks!

emilknudstrup avatar Jan 25 '24 07:01 emilknudstrup

Could you share with me your version of matplotlib??

jvines avatar Feb 05 '24 18:02 jvines

Sure thing. My matplotlib version is 3.8.2.

emilknudstrup avatar Feb 06 '24 07:02 emilknudstrup

@rcamuccio and I came across this very same issue today. Just found the API change from matplotlib:

https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.8.0.html#unused-methods-in-axis-tick-xaxis-and-yaxis

The XTick and YTick classes inherit Tick base class.

@emilknudstrup points to the recommended updated API.

We could see about making a patch and pull request to ease the transition between versions with a try/except block if you'd like.

moemyself3 avatar Feb 29 '24 05:02 moemyself3

I've updated the requirements.txt so this doesn't happen again.

jvines avatar Jul 14 '24 19:07 jvines