-
Notifications
You must be signed in to change notification settings - Fork 76
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
_gridOnMajor bug with recent versions of Matplotlib #75
Comments
I run into similar error. |
The easiest workaround is probably to use an earlier version of Matplotlib (although I am not certain of the exact version number at which the bug started to occur). The other workaround (that I implemented) was to make mplleaflet use the updated mplexporter module (from mpld3), not the older version currently used my mplleaflet. I had to modify two lines of code in mplleaflet (to transform local mplexporter imports into external imports) and pip install mplexporter as an external package. This works very well, and I can provide some details on how to do this if necessary ... ... of course, it would be better to update mplleaflet directly, but I stuggled with the git-submodule/makefile system and could not find an easy way to submit a straighforward pull request. |
Thanks @ovinc for your response. I will appreciate it more if you can provide details on the second workaround (using mplexporter module). Regards |
Ok, basically the workaround consists in installing separately mplexporter and my forked version of mplleaflet. Here is how to achieve this: Option A: using gitDownload into your folder of choice my forked version of mplleaflet, with modifications on the git clone https://github.com/ovinc/mplleaflet.git
cd mplleaflet
git checkout dev Still from the mplleaflet directory, activate the mplexporter submodule: git submodule init
git submodule update Again from the mplleaflet directory, install the mplexporter submodule, then mplleaflet: pip install ./mplexporter
pip install . Option B: without using git
After these steps, you should be able to use mplleaflet in python with recent versions of matplotlib. (Note: this could be simpler using makefile to activate and install the submodule, but I had trouble with this process on my machine, this is why I'm proposing the longer steps above). |
Thank you I will try and revert back to if need be |
Downgrading with |
I am also having the same probelm. |
Have the same issue, but downgrading to matplotlib 3.3.2 did not fix the problem for me. |
I am having the same problem, and downgrading did work |
After upgrading to Matplotlib 3.3.3, the following error appears when trying to use mplleaflet:
'XAxis' object has no attribute '_gridOnMajor
The problem comes from mplexporter and was corrected in mpld3's mplexporter (see mpld3/mpld3#479) but the correction has not been propagated to the version of mplexporter used by mplleaflet.
The text was updated successfully, but these errors were encountered: