-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Rectified plot error #12501
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
Rectified plot error #12501
Conversation
The plot shown on the page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py Will be possible only if plt.show() is outside the loop
Thanks for the patch, but that code is intended to be that way (check the paragraph before it.) The image shows three lines because |
Agreed with @QuLogic, proposing to close the PR. |
If the image isn't able to show what the code does, especailly if it shows the contrary of what the code does, it should be removed. I also cannot think of another good visualization of this case. My proposal would hence be to change the relevant part to
|
By the way, I think I know how to make this work in sphinx-exhibit, if there's still interest for that... |
I don't currently see much of a use case for "making this work". In this case, you wouldn't want to clutter the tutorial with 3 images of those plots anyways, right? |
I agree with @ImportanceOfBeingErnest 's change. I think that example is meant to show the workflow of
There is no good way to show that in rendered static figures in the docs so it is better to just change it to a code block. |
@anubhavshrimal Thanks for your work on this! |
In this specific case I agree
That's what I had in mind. |
Just to make sure how this is moving forwards, |
@ImportanceOfBeingErnest Though I would love to work on the discussed changes, I am not really sure how to go about doing that. |
@anubhavshrimal it should really be as simple as mentionned above
|
I have made some changes in the code and docs. Is that what you needed? |
That code block above was meant literally. The idea, as also stated by @tacaswell above
would be to not generate any visual output for this code. |
oh! So what I have understood is that you mean to comment out the rest of the code block as you have done? |
Yes, exactly. |
Done! Have a look. 👍 |
In principle yes, except you missed the double colon ( |
The remaining error seems to come from Line 84 in 4e9b699
which should apparently read
instead. Can you change that as well and see if tests pass. (The codecov error is not important here, but continuous-integration tests need to pass.) |
Sorry but I am not sure what you mean by E501 |
|
* master: (51 commits) Disable sticky edge accumulation if no autoscaling. Avoid quadratic behavior when accumulating stickies. Rectified plot error (matplotlib#12501) endless looping GIFs with PillowWriter (matplotlib#11789) TST: add test for re-normalizing image FIX: colorbar re-check norm before draw for autolabels Fix search for sphinx >=1.8 (matplotlib#12216) Fix some flake8 issues Don't handle impossible values for `align` in hist() DOC: add section about test / doc dependencies DOC: clarify time windows for support TST: test colorbar tick labels correct FIX: make minor ticks formatted with science formatter as well DOC: clarify what 'minor version' means Adjust the widths of the messages during the build. Simplify radar_chart example. Fix duplicate condition in pathpatch3d example (matplotlib#12495) Fix typo in documentation FIX: make unused spines invisible Kill FontManager.update_fonts. ...
The plot shown on the page: https://matplotlib.org/tutorials/introductory/usage.html#sphx-glr-tutorials-introductory-usage-py
Will be possible only if plt.show() is outside the loop
PR Summary
PR Checklist