-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX: allow start-stop subplot #17344
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
a2f73b1
to
37593c4
Compare
I'm with @story645 's comment in the original issue "we support that ?!?". Agree that we should not break it. |
matlab documentation: https://www.mathworks.com/help/matlab/ref/subplot.html See the subhead under "p"
|
89fa0e0
to
be1b730
Compare
lib/matplotlib/figure.py
Outdated
The position of the subplot described by one of | ||
|
||
- Three integers (*nrows*, *ncols*, *index*). The subplot will | ||
take the *index* position on a grid with *nrows* rows and | ||
*ncols* columns. *index* starts at 1 in the upper left corner | ||
and increases to the right. | ||
and increases to the right. *index* can also be a two-tuple | ||
specifying the (*start*, *stop*) indices of the subplot, i.e., |
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.
Oops, just realized this is an e.g., not i.e..
specifying the (*start*, *stop*) indices of the subplot, i.e., | |
specifying the (*start*, *stop*) indices of the subplot, e.g., |
See #17350 for an alternative approach. |
Closing in lieu of #17350 (though I would somewhat prefer to get a request to revise than a completely different PR that does the same thing). |
I generally try to do that, but here the whole approach was so different that I though it would be faster to just write it rather than to describe what I'd prefer. Sorry about that, wasn't trying to PR-snipe you :-) |
PR Summary
Closes #17343
add_subplot
is meant to accept spans for the third parameter, but this was broken by #16527 which was doing more careful argument checking. Happy to take criticism on how I did this, but I think it works...TODO:
PR Checklist