-
Notifications
You must be signed in to change notification settings - Fork 57
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
Issue with newer version of matplotlib #22
Comments
Same problem here, did you manage to fix this? |
I'm having the same issue, is there still no fix? (edit) |
This isn't strictly a py-upset issue although it will most likely need to be resolved here. In matplotlib > 2.2.0, the getitem method was re-written to include a new "normalize" definition. I'm not sure this is a problem in matplotlib rather than desired behaviour but there are two ways of fixing it:
def __getitem__(self, key):
"""Create and return a SuplotSpec instance.
"""
nrows, ncols = self.get_geometry()
def _normalize(key, size): # Includes last index.
if isinstance(key, slice):
start, stop, _ = key.indices(size)
if stop > start:
return start, stop - 1
+ return stop - 1, start
else:
if key < 0:
key += size
if 0 <= key < size:
return key, key
raise IndexError("invalid index")
|
I'm Still having the same issue ! Any Fix around >? |
Also still having the same issue despite mproffitt's suggestion. The error's just moved to line 154.. Any ideas? |
Same here...invalid index when I try to demo the code IndexError Traceback (most recent call last) ~/anaconda3/lib/python3.6/site-packages/pyupset/visualisation.py in plot(data_dict, unique_keys, sort_by, inters_size_bounds, inters_degree_bounds, additional_plots, query) ~/anaconda3/lib/python3.6/site-packages/pyupset/visualisation.py in init(self, rows, cols, additional_plots, query) ~/anaconda3/lib/python3.6/site-packages/pyupset/visualisation.py in _prepare_figure(self, additional_plots) ~/anaconda3/lib/python3.6/site-packages/matplotlib/gridspec.py in getitem(self, key) ~/anaconda3/lib/python3.6/site-packages/matplotlib/gridspec.py in _normalize(key, size) IndexError: invalid index |
Fork using Cole Boudreau's solution above: (my first try at forking and changing someone else's code, so if I did something reproachable please let me know!) |
Due to this issue I've switched to this version of UpSet implementation: https://github.com/jnothman/UpSetPlot and it seems to be working fine. |
Thanks for the package it is very useful. I do get an index error unless I use matplotlib 1.4.3. The new version (2.2.0) fails with the following trace back
You can recreate the error running your test dataset with updated matplotlib.
Best,
Jennifer
The text was updated successfully, but these errors were encountered: