joferkington / mplstereonet

Stereonets for matplotlib
MIT License
189 stars 66 forks source link

TypeError when trying to plot example #35

Closed AlexanderJuestel closed 4 years ago

AlexanderJuestel commented 4 years ago

Hey @joferkington,

I was going to create some stereoplots with mplstereonet but when trying to run the example I got the following error: TypeError: tuple indices must be integers or slices, not tuple. Is that a known issue? I attached an image of the code, also with the current versions of matplotlib and mplstereonet. It seems to be related to matplotlib I guess.

Thanks for your help.

image

robgeotech commented 4 years ago

Seems similar to issue #34 . I had the same issue in Jupyter notebook (with Anaconda) after updating versions of Matplotlib (from 3.1.1 to 3.1.2) and Numpy. Updating to the development version of mplstereonet as referenced in another issue (#16 (comment)) seemed to solve the problem.

AlexanderJuestel commented 4 years ago

Hey @robgeotech,

Thanks for your response. That is not optimal though 😛

We are using mplstereonet in another package (GemPy) as dependency and this would break parts of the package if new users have fairly new versions of matplotlib. Any chance @joferkington will release a new version given the last release was a couple of years ago?

Cheers Alex

joferkington commented 4 years ago

Yes, things are far overdue for a release. I had been holding off until I could fix a key positioning bug with newer versions of matplotlib that affects colorbars (#32). However, it seems my available non-work time keeps shrinking.

I'll upload a 0.6 release today.

joferkington commented 4 years ago

https://pypi.org/project/mplstereonet/0.6.0/ should address this. To updgrade, you can do either pip install 'mplstereonet==0.6.0' or pip install --upgrade mplstereonet

Sorry for the rather extreme delay in releasing the new version!

AlexanderJuestel commented 4 years ago

@joferkington thank you very much. That was really quick :D

I can also confirm that this bug has been resolved now and mplstereonet is working with matplotlib 3.2.2 (see screenshot)

image