andrenarchy / pseudopy

PseudoPy computes and visualizes the pseudospectrum of a matrix
MIT License
24 stars 5 forks source link

Update plotting to work with Matplotlib 2.2+. #5

Closed ketch closed 5 years ago

ketch commented 5 years ago

In recent versions of Matplotlib, axes.color_cycle doesn't exist, so the plotting routines throw a KeyError. This fixes that. I believe the fix is backward-compatible.

andrenarchy commented 5 years ago

Hey @ketch, thanks for your PR!

I updated the master branch such that it runs fine on Travis CI again. Can you rebase?

And regarding the fix: it seems like axes.color_cycle was replaced with axes.prop_cycle – can you verify this and change the PR accordingly?

ketch commented 5 years ago

it seems like axes.color_cycle was replaced with axes.prop_cycle

Yes, I saw that but I actually prefer what's in this PR. If you don't, feel free to patch it your way and close this.

Thanks for writing pseudopy and making it available -- it has been very useful to me!

andrenarchy commented 5 years ago

So from what I see it's the best solution if we update pseudopy to use axes.prop_cycle so we don't have any hard-coded values in there. I think you can then just update your preferences in your matplotlibrc as described in https://matplotlib.org/users/dflt_style_changes.html#colors-color-cycles-and-color-maps – would that work for you?

And I'm glad you find pseudopy useful! :) If you're using it in a project that is available publicly (github or elsewhere) I'd be happy to include a link to it in the README.

ketch commented 5 years ago

it's the best solution if we update pseudopy to use axes.prop_cycle so we don't have any hard-coded values in there

Sure, that seems fine. I just didn't have time to figure out the syntax and this aspect wasn't important to me.

So far I've used pseudopy a few times for teaching purposes. If I use it in a more serious way, I will let you know.

andrenarchy commented 5 years ago

Do you want to update the PR to use axes.prop_cycle?

ketch commented 5 years ago

No; like I said before: feel free to patch it your way and close this.

andrenarchy commented 5 years ago

Fixed in 1.2.5.