[MRG] Fix plot_svm_scale_c.py and plot_discretization_classification.py use deprecated plt api#11586
Conversation
rth
left a comment
There was a problem hiding this comment.
This LGTM, but plot_discretization_classification.py would also need to be fixed to solve the parent PR.
The the issue is generally the use of plt.subplot (see https://stackoverflow.com/a/46934052/1791279), in particular the loop at the very end will overwrite some axis.
The solution could be to create an array of axis with fix, ax = plt.subplots(..) and use ax[i] directly.
|
plt.subplot is used in many example... @dsleo you want to complete this in this PR? |
|
The immediate concern for the release is to fix those that call Fixing all the other examples to use the latest matplotlib API would definitely be useful, but I think it's less urgent and could be done is a separate PR. |
|
ok I pushed here the fix for plot_discretization_classification.py |
|
Merging, thanks! (Circle CI : deploy doesn't do anything in a PR, and this fix should not have any Windows specifics parts, so not waiting for Appveyor). |
Reference Issues/PRs
fixes #11564
What does this implement/fix? Explain your changes.
Remove the iterative use of
plt.subplotthat will soon be deprecated.Any other comments?
Not sure there is something to do for
plot_discretization_classification.py, no warning were raised when I tried to reproduce. Am I missing something ?