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

mplleaflet AttributeError: 'XAxis' object has no attribute '_gridOnMajor' #80

Open
22tommibaer01 opened this issue Oct 20, 2021 · 0 comments

Comments

@22tommibaer01
Copy link

mplleaflet attribute error with first use

Problem

  • download mplleaflet v. 0.0.5 from conda-forge
  • started a test script like
import matplotlib.pyplot as plt
import mplleaflet

long=[72.12,72.012,72.25,72.0254,73] #data (random)
lat=[50,50.21,51.1263,52.4174,53.21]

ax=plt.plot(long, lat) #matplotlib

mplleaflet.display() #mplleaflet
  • not working; Error:
file "C:\Anaconda\lib\site-packages\mplleaflet\mplexporter\utils.py", line 241, in get_grid_style
    if axis._gridOnMajor and len(gridlines) > 0:

AttributeError: 'XAxis' object has no attribute '_gridOnMajor'

Solution

  • not a big deal, just one line of code
  • solution by this

Possible Solution

  • go to line and file from the error message (def get_grid_style)
  • change axis._gridOnMajor to axis._major_tick_kw['gridOn']
  • finish

Setup

  • conda 4.10.3
  • python 3.8.8
  • matplotlib 3.4.2
  • mplleaflet 0.0.5
CTPAHH1K added a commit to CTPAHH1K/mplexporter that referenced this issue Jan 11, 2023
CTPAHH1K added a commit to CTPAHH1K/mplleaflet that referenced this issue Jan 11, 2023
CTPAHH1K added a commit to CTPAHH1K/mplleaflet that referenced this issue Jan 11, 2023
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

1 participant