-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
DOC change normed to density in matplotlib calls in examples #12718
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
Conversation
It breaks on old matplotlib though. |
Yes it does break on really old matplotlib, but not on the matplotlib LTS. So I guess the right way would be to raise the minimum requirements on our python 2 CI, and then merge this one. If we do that, maybe we could also raise the min versions for other dependencies such as |
See README: for running the examples Matplotlib >= 1.4 is required. I think we need to fix this one before deprecating python2, because normed will be deprecated in matplotlib 3.1. At that time, 0.20.X is likely to be the latest stable version.
Apart from raising the minimal version, we have other solutions, see e.g., https://github.com/scikit-learn/scikit-learn/blob/master/examples/decomposition/plot_sparse_coding.py (introduce different solutions for different versions). |
@qinhanmin2014 I see. So our website doesn't mention a min dependency, but our README (which is mirrored on PyPi) does. Hmm, do we have a strong attachment to those requirements? I'd say since these changes don't change anything regarding the usage of our API, and they're only examples, we can just change the README to move the min requirement a bit upward. Otherwise I can make the examples support both matplotlib APIs. Also, the README says matplotlib >= 1.4, and I guess moving to 2.1.2 or 2.2.3 would be reasonable since matplotlib lists:
That said, Ubuntu 14.04 has matplotlib 1.3.1, and 16.04 matplotlib 1.5.1, I guess. |
I think the min dependency comes from Ubuntu 14.04. We'll need more consensus to change the min dependency (not so easy I think). |
@adrinjalali Do you have time to investigate when (which version) did matplotlib introduce the density parameter? |
I think, for 0.21 we can use 16.04 LTS as the oldest "supported" Ubuntu. That's what we were planning to do for numpy and scipy in #12184 So it might make sense to do the same for matplotlib and scikit-image. |
@rth But I'd rather hurry this one into 0.20.2, see my comment above:
Sorry for the stupid mistake. density parameter is introduced in matplotlib 2.1, which is indicated in the deprecation message. Hmm, @rth the minimal version of matplotlib for Ubuntu 16.04 is 1.5.1? Do you have time to check it (and provide the URL)? |
Sure
it's 1.5.1 for matplotlib (https://packages.ubuntu.com/xenial/python3-matplotlib) and 0.10.1 for scikit-image (https://packages.ubuntu.com/xenial/python3-skimage). |
Thanks @rth, so seems that we need version comparison here even if we don't want to include the change in 0.20.2. Do you want to complete it? @adrinjalali |
Sure, I'll fix the examples here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to [doc build], our Circle CI is often overburdened :)
…cikit-learn#12718)" This reverts commit a6bc5d8.
…cikit-learn#12718)" This reverts commit a6bc5d8.
As pointed out in #12654 by @qinhanmin2014 , the
normed
todensity
issue may be more urgent than the other fixes. Hence here's a fix for those only, in our examples.