GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||
GeezerVison is showing github.com — DOC: Tutorial on API shortcuts by timhoffm · Pull Request #30952 · matplotlib/matplotlib Conversation
Member
Closes #30941.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
timhoffm
force-pushed
the
api-shortcuts
branch
from
86f6b00 to
a02dbfb
Compare
anntzer
reviewed
Uh oh!
There was an error while loading. Please reload this page.
timhoffm
force-pushed
the
api-shortcuts
branch
2 times, most recently
from
6e76aa7 to
ed817a0
Compare
QuLogic
reviewed
Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
rcomer
reviewed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most of my thoughts were addressed as I kept reading 🙂
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Uh oh!
There was an error while loading. Please reload this page.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason to use
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is indeed a debatable aspect I think the options are more or less: flowchart LR
A["A: fig, ax = plt.subplots()"]
A --> B["B: ax = plt.figure().subplots()"]
A --> C["C: ax = plt.figure().add_subplot()"]
B --> D["D: ax = plt.axes()"]
C --> D
B --> E["E: ax = plt.subplot()"]
C --> E
I have chosen Favoring D over E is based on my dislike for
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Plt.axes is pretty ambiguous as to whether it is treated as a subplot, and hence placed using subplot_params or not. I looked at the source and it is created with add_subplot (unless you use a four-tuple) so thats probably fine, but the ambiguity is a bit confusing. On the other hand the number of times I've mistyped subplot when I meant subplots is an argument against subplot!
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I see.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exactly, one could discuss whether supporting argument-less
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
|
@rcomer @story645 I'm not 100% happy with the title Shorter call patterns (and the filename |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I'd just name it shortcuts since that's what you named the PR and put the note about these being shorter calls in the preamble if it's not already there. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
What shortcuts exactly?
For now I stay with "Shorter call patterns", which seems the most understandable to me. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
eedfe13 to
2a9c9d4
Compare
|
"Coding shortcuts"? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
2a9c9d4 to
bec52d0
Compare
|
I like "Coding shortcuts". "Coding" has the right informal pragmatism that applies to this tutorial. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Ruth Comer <[email protected]>
There was an error while loading. Please reload this page.
…952-on-v3.10.8-doc Backport PR #30952 on branch v3.10.8-doc (DOC: Tutorial on API shortcuts)
…952-on-v3.10.x Backport PR #30952 on branch v3.10.x (DOC: Tutorial on API shortcuts)
…t-of-pr-30952-on-v3.10.x Backport PR matplotlib#30952 on branch v3.10.x (DOC: Tutorial on API shortcuts)
…t-of-pr-30952-on-v3.10.8-doc Backport PR matplotlib#30952 on branch v3.10.8-doc (DOC: Tutorial on API shortcuts)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Idea: Reducing verbosity through more compact API patterns
There was an error while loading. Please reload this page.