Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with matplotlib version 2.2.3 #10

Closed
ixicrom opened this issue Aug 5, 2019 · 6 comments
Closed

Problems with matplotlib version 2.2.3 #10

ixicrom opened this issue Aug 5, 2019 · 6 comments

Comments

@ixicrom
Copy link

ixicrom commented Aug 5, 2019

The newest versions of matplotlib no longer includes support for axes.color_cycle as an rc parameter. Apparently this was deprecated in matplotlib 1.5

It seems that the solution to this is to use the cycler package, as in this example: https://matplotlib.org/1.5.1/examples/color/color_cycle_demo.html

The problem in in file base.py line 104, but I'm currently not sure how exactly this needs to be updated.

@briandleahy
Copy link
Contributor

Thanks for raising this issue. The solution is probably to stop importing peri.viz.base on the initial import, as well as fixing that line in base.py. Can you tell me when you got the error? I'll try to fix it tonight.

@ixicrom
Copy link
Author

ixicrom commented Aug 5, 2019

I got the error while trying to test the example code from the walkthrough:
from peri import util
from peri.viz.interaction import OrthoViewer
im = util.RawImage('small_confocal_image.tif')
OrthoViewer(im.get_image())

I have managed to fix it on my machine by replacing line 104 in base.py with 'axes.prop_cycle': cycler.cycler('color', COLORS + ['#FF7F00', '#D0D033','#A65628','#F781BF','#999999']),
and adding import cycler to the start of that file too (although I imagine there may be somewhere better to do this).

@briandleahy
Copy link
Contributor

Hmm.... I'm on matplotlib 3.1.1 and I have no problems with the tutorial on master.

Can I ask you, what version of peri are you running and how did you install it? Can you try to install it from master and see if it works? I think this problem may have already been fixed on master. If so, it may be that the version on pypi is out of date and needs to be updated.

@ixicrom
Copy link
Author

ixicrom commented Aug 6, 2019

I installed it using pip, I'll try and install from master and will report back!

@ixicrom
Copy link
Author

ixicrom commented Aug 6, 2019

Everything works fine for me on the master version, so looks like that update is all that's needed to solve my issue!

@briandleahy
Copy link
Contributor

Should be fixed with new version on pypi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants