astroARIADNE
astroARIADNE copied to clipboard
SEDPlotter.plot_corner: AttributeError: 'XTick' object has no attribute 'label'
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!
Could you share with me your version of matplotlib??
Sure thing. My matplotlib version is 3.8.2.
@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.
I've updated the requirements.txt so this doesn't happen again.