Hoeijmakers / tayph

Analysis of high resolution spectroscopic time-series of exoplanets
9 stars 9 forks source link

Updating drag_color.py script, to be compatable with updated versions of matplotlib #124

Closed nborsato closed 1 year ago

nborsato commented 1 year ago

In the drag_color.py script, the patch attribute is called from Colorbar. However, in more recent versions of Matplotlib (starting from version 3.4.0), the Colorbar object no longer has a patch attribute. Instead, it uses the outline attribute to access the rectangular patch of the colorbar. Therefore, replacing all instances of patch with outline in the script should fix this issue.

This issue occurs because the Colorbar object was updated in recent versions of Matplotlib, and some of the attributes and methods have been changed or removed. As a result, code that was written for older versions of Matplotlib may not work correctly in newer versions.

To avoid this issue, it's a good idea to check the version of Matplotlib you're using and make sure that any code you're using is compatible with that version. If you're using an older version of Matplotlib, you may need to update your code to work with newer versions.