Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
DOC: remove examples of subplot(123) from docs#17335
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -92,7 +92,7 @@ Axes creation | |||
use:: | |||
f = Figure(figsize=(5,4), dpi=100) | |||
a = f.add_subplot(111) | |||
a = f.add_subplot(1, 1, 1) |
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.
I strongly think we should not change old API changes notes -- they should stay representative of what the lib was back when that release occured.
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.
Agreed. Well, I kept a couple of the really recent ones...
doc/devel/documenting_mpl.rst Outdated
@@ -820,7 +820,7 @@ example is generated from | |||
s = 1 + np.sin(2 * np.pi * t) | |||
# Note that using plt.subplots below is equivalent to using | |||
# fig = plt.figure and then ax = fig.add_subplot(111) | |||
# fig = plt.figure and then ax = fig.add_subplot(1, 1, 1) |
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.
Note thatadd_subplot(111)
can be spelt even more succintly asadd_subplot()
now (it defaults to 111). Especially when you're clearly not going to have a single subplot, I think the argless version is actually the cleanest.
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.
agreed.
Semi-OT: IMHO |
jklymak commentedMay 5, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@timhoffm I agree, but thats afar bigger job. And the Conversely |
Anybody using BTW, we could add |
Nice idea - `subplot(4, 4, (0, 3))`I suppose you could just forbid `subplot(44, (0, 3))`, and then 0-basedindexing would make more sense. |
|
timhoffm commentedMay 6, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
And when you think you know all the miraculous ways you can create an Axes, there‘s always one more API ... 😩. I‘m really not sure we should change any of these API anymore unless we have a greater plan which and how these should be used (and maybe soft-deprecate some). This is only referring to |
Well, we already have |
I would be happy to see the 3-digit form go--but we're still stuck with it in the |
I don't see any reasons not to merge this, but it's grown a bunch of conflicts now. |
👍 on the PR. It's proably easier to redo this from scratch using regex serach&replace than handling all the conflicts. |
I only relearn regexp every 6 months or so, so this may have to wait, or anyone else is welcome to take this up instead! |
Most cases have been addressed via the above PRs. Still open: More complex layouts that are not full single-cell grids. These can be handled using |
I'll go ahead and close this, but feel free to restore if you need it to track the issue... |
PR Summary
Changes all
*subplot(123,
tosubplot(1, 2, 3
in the docs and code base.Sorry, I dislike these thrashy PRs as well, but feel we should really soft-deprecate this usage...
PR Checklist