Spot an error of mplstereonet while using Google Colab
See original GitHub issueHi @joferkington, I just tried the code of basic usage in Google Colab 2 weeks ago and it succeeded, but when I re-try to plot in Google Colab again, I spot an error that I couldn’t solve. It’s related to code: ax = fig.add_subplot(111, projection='stereonet')
. The error is as follows:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-13-5f249805830b> in <module>()
3
4 fig = plt.figure()
----> 5 ax = fig.add_subplot(111, projection='stereonet')
6
7 strike, dip = 315, 30
11 frames
/usr/local/lib/python3.6/dist-packages/mplstereonet/stereonet_transforms.py in transform_non_affine(self, ll)
69 _inverse_type = 'BaseInvertedTransform'
70 def transform_non_affine(self, ll):
---> 71 longitude = ll[:, 0:1]
72 latitude = ll[:, 1:2]
73 clong = self._center_longitude
TypeError: tuple indices must be integers or slices, not tuple
I also attached my Colab notebook to you, link here. Is there something wrong or missing in my codes? Looking forward for your help 😃
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How do I avoid format errors using matplotlib in Google Colab?
Code error I am trying to plot time series data from a csv in google Colab and am getting the following error:.
Read more >04.03-Errorbars.ipynb - Colaboratory - Google Colab
Suppose I augment this information with reported uncertainties: the current literature suggests a value of around 71 $\pm$ 2.5 (km/s)/Mpc, and my method...
Read more >visualization — Blog - Agile Scientific
I wondered what a comparison plot for the various regressors in Scikit-Learn would look ... The small numbers in each plot are RMS...
Read more >conda-forge feedstocks | community driven packaging for conda
packages on conda-forge ... google-cloud-bigquery: google-cloud-bigquery-feedstock · google-colab: google-colab-feedstock · google-cloud-firestore: ...
Read more >Matplot Horizontal Axis Problem in Google Colab?
Below code is going to plot temperature values in Colab by matplot library. Although code is working, horizontal axis values (dates) can not ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As other folks mentioned, this has been fixed in master for quite awhile, but things were long overdue for a release.
v0.6
includes fixes for this, among other things, so a defaultpip install
should work now. To upgrade to the current release, you can do eitherpip install 'mplstereonet==0.6.0'
or pipinstall --upgrade mplstereonet
@yohanesnuwara I had the same issue in Jupyter notebook (with Anacondo) 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 (https://github.com/joferkington/mplstereonet/issues/16#issuecomment-275771610) seemed to solve the problem.