axisgrid fails with matplotlib v2
See original GitHub issueTrying to plot a joinplot, and axisgrid is failing with:
Traceback (most recent call last):
File "jet_statistics.py", line 114, in <module>
xlim=lims, ylim=lims)
File "/home/dstansby/seaborn/seaborn/distributions.py", line 798, in jointplot
xlim=xlim, ylim=ylim)
File "/home/dstansby/seaborn/seaborn/axisgrid.py", line 1643, in __init__
plt.setp(ax_marg_x.yaxis.get_minorticklines(), visible=False)
File "/home/dstansby/miniconda3/lib/python3.5/site-packages/matplotlib/pyplot.py", line 359, in setp
return _setp(*args, **kwargs)
File "/home/dstansby/miniconda3/lib/python3.5/site-packages/matplotlib/artist.py", line 1430, in setp
insp = ArtistInspector(objs[0])
IndexError: list index out of range
I think this is because ax_marg_x.yaxis.get_minorticklines() is a list of zero length, which in matplotlib 2 causes plt.setp to throw an IndexError.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
matplotlib.axes.Axes.grid — Matplotlib 3.6.2 documentation
Configure the grid lines. Parameters: visiblebool or None, optional. Whether to show the grid lines. If any kwargs are supplied, it is assumed ......
Read more >matplotlib.pyplot.errorbar — Matplotlib 3.6.2 documentation
An alias to the keyword argument markeredgewidth (a.k.a. mew). This setting is a more sensible name for the property that controls the thickness...
Read more >matplotlib.axis.Axis.grid — Matplotlib 3.6.2 documentation
Configure the grid lines. Parameters: visiblebool or None. Whether to show the grid lines. If any kwargs are supplied, it is assumed you...
Read more >API Changes for 3.5.0 — Matplotlib 3.6.2 documentation
The first parameter of Axes.grid and Axis.grid has been renamed to visible# ... Calling Figure.add_axes with no arguments will raise an error.
Read more >Matplotlib 3.6.2 documentation
In [1]: %matplotlib In [2]: import matplotlib.pyplot as plt ... raise an ImportError if the backend cannot be set up (either because it...
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 Free
Top 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

confirmed that this works after updating matplotlib. thanks @mwaskom.
The proposed fix in this issue also worked for me for matplotlib v1.4.3