| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Why all the extra plt.show() calls? sphinx-gallery should show the figures under the block they were created in, and I always think it's better to just have one plt.show() call at the end when running examples locally so all the figures appear at once. |
Sorry, something went wrong.
|
Ah, because if you don't SG put "Out: Legend(...)" in a yellow box after everything. I could just put semicolons I guess? |
Sorry, something went wrong.
|
I'm +1 for semicolons as opposed to plt.show() |
Sorry, something went wrong.
|
Hmm, except semicolons are a flake8 exception... |
Sorry, something went wrong.
There was a problem hiding this comment.
Lets leave it with plt.show()s then, not a big deal 😄
Sorry, something went wrong.
|
This commit drops the shows, adds ; and puts in an exception for the trailing semicolon. In exchange I got rid of the lines that were too long 😉 OTOH we never make this exception so I'm not quite sure what our policy is on it. I personally don't see what the big deal is, and it greatly enhances the readability of the examples. Maybe there is a SG setting to suppress... |
Sorry, something went wrong.
|
I don't think we should add in the ; exception to flake8 just for this file. You could set leg = ... to capture the return, or change the capture_repr/ignore_repr https://sphinx-gallery.github.io/stable/configuration.html#prevent-capture-of-certain-classes |
Sorry, something went wrong.
|
I understand in general we do not want semicolons at the end of statements, but in this case it serves a really useful purpose - it saves the extra useless and confusing output, or it saves a spurious plt.show, or it saves a spurious and confusing assignment. OTOH I won't object if someone has a way to suppress these via configuration. However, note that some of our examples want the output to show up, so it can't be global. |
Sorry, something went wrong.
|
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
git checkout v3.5.x git pull
git cherry-pick -m1 f091d46a8559178f9ddd99553bb5415476469f10
git commit -am 'Backport PR #21794: DOC: some minor fixes to the usage rewrite'
git push YOURFORK v3.5.x:auto-backport-of-pr-21794-on-v3.5.x
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the Still Needs Manual Backport label once the PR gets merged. If these instructions are inaccurate, feel free to suggest an improvement. |
Sorry, something went wrong.
|
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
git checkout v3.5.0-doc git pull
git cherry-pick -m1 f091d46a8559178f9ddd99553bb5415476469f10
git commit -am 'Backport PR #21794: DOC: some minor fixes to the usage rewrite'
git push YOURFORK v3.5.0-doc:auto-backport-of-pr-21794-on-v3.5.0-doc
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the Still Needs Manual Backport label once the PR gets merged. If these instructions are inaccurate, feel free to suggest an improvement. |
Sorry, something went wrong.
|
I'm in favor of not backporting this and letting the examples start to diverge again. |
Sorry, something went wrong.
|
I think we should back-port these, as the current Usage Guide is very sparse.... |
Sorry, something went wrong.
DOC: some minor fixes to the usage rewrite
DOC: some minor fixes to the usage rewrite
…3.5.0-doc Manual Backport #21794 from jklymak/doc-basic-usage-fixes
I have no idea why, but the yellow output boxes are still present in the current devdocs Basic Usage tutorial, despite the semicolons. |
Sorry, something went wrong.
|
Yes, that didn't work too well ;-) |
Sorry, something went wrong.
DOC: some minor fixes to the usage rewrite
DOC: some minor fixes to the usage rewrite
DOC: some minor fixes to the usage rewrite
DOC: some minor fixes to the usage rewrite
DOC: some minor fixes to the usage rewrite
DOC: some minor fixes to the usage rewrite
DOC: some minor fixes to the usage rewrite
DOC: some minor fixes to the usage rewrite
DOC: some minor fixes to the usage rewrite
DOC: some minor fixes to the usage rewrite
DOC: some minor fixes to the usage rewrite
| Back | FazBrowse Home | New Git URL |
PR Summary
This fixes a few typos and missed commas in usage.py.
Follow up of #21641
PR Checklist
Tests and Styling
Documentation