zhaokg / Rbeast

Bayesian Change-Point Detection and Time Series Decomposition
208 stars 36 forks source link

fix matplotlib versioning #21

Closed KBodolai closed 7 months ago

KBodolai commented 7 months ago

There's a bug in the rb.plot() function, where a couple of functions check the matplotlib version to avoid TypeError: Axes.stem() got an unexpected keyword argument 'use_line_collection', however the inequality is pointing in the wrong direction.

This pr just changes the direction of the inequality, tested it with matplotlib 3.8.2 and works fine now (whereas previously raised the type error)

KBodolai commented 7 months ago

I've tested the previous method and it works up to matplotlib 3.6 (unsure if 3.7)

zhaokg commented 7 months ago

Dear Kristian Bodolai,

Really appreciate your help. Apparently, this is a "tricky" and embarrassing bug. I will incorporate the change, re-compile everything, and post the wheels on PyPI later this week. Thanks again for the valuable help.

Kaiguang

KBodolai commented 7 months ago

not embarrasing at all, this happens to me all the time!

Let me know if you want me to do any more testing around it, and thank you!