-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: plotting section for Users Guide #29124
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
Open
jklymak
wants to merge
2
commits into
matplotlib:main
Choose a base branch
from
jklymak:doc-plotting
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
galleries/examples/images_contours_and_fields/contour_demo.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _contour_demo: | ||
|
||
============ | ||
Contour Demo | ||
============ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
""" | ||
.. _contourf_demo: | ||
============= | ||
Contourf demo | ||
============= | ||
|
2 changes: 2 additions & 0 deletions
2
galleries/examples/images_contours_and_fields/contourf_log.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _contourf_log: | ||
|
||
============================ | ||
Contourf and log color scale | ||
============================ | ||
|
4 changes: 4 additions & 0 deletions
4
galleries/examples/images_contours_and_fields/image_antialiasing.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
""" | ||
.. _image_antialiasing: | ||
|
||
.. _image_resampling: | ||
|
||
================ | ||
Image resampling | ||
================ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _image_demo: | ||
|
||
======================== | ||
Many ways to plot images | ||
======================== | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _pcolor_demo: | ||
|
||
============= | ||
pcolor images | ||
============= | ||
|
2 changes: 2 additions & 0 deletions
2
galleries/examples/images_contours_and_fields/pcolormesh_grids.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
galleries/examples/images_contours_and_fields/plot_streamplot.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _plot_streamplot: | ||
|
||
========== | ||
Streamplot | ||
========== | ||
|
2 changes: 2 additions & 0 deletions
2
galleries/examples/images_contours_and_fields/tricontour_demo.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _tricontour_demo: | ||
|
||
=============== | ||
Tricontour Demo | ||
=============== | ||
|
2 changes: 2 additions & 0 deletions
2
galleries/examples/images_contours_and_fields/tricontour_smooth_delaunay.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
galleries/examples/images_contours_and_fields/tricontour_smooth_user.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _tricontour_smooth_user: | ||
|
||
====================== | ||
Tricontour Smooth User | ||
====================== | ||
|
2 changes: 2 additions & 0 deletions
2
galleries/examples/images_contours_and_fields/tripcolor_demo.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _tripcolor_demo: | ||
|
||
============== | ||
Tripcolor Demo | ||
============== | ||
|
2 changes: 2 additions & 0 deletions
2
galleries/examples/images_contours_and_fields/triplot_demo.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _triplot_demo: | ||
|
||
============ | ||
Triplot Demo | ||
============ | ||
|
2 changes: 2 additions & 0 deletions
2
galleries/examples/lines_bars_and_markers/categorical_variables.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _eventplot_demo: | ||
|
||
============== | ||
Eventplot demo | ||
============== | ||
|
2 changes: 2 additions & 0 deletions
2
galleries/examples/lines_bars_and_markers/fill_between_demo.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _step_demo: | ||
|
||
========= | ||
Step Demo | ||
========= | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _box3d: | ||
|
||
=================== | ||
3D box surface plot | ||
=================== | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _intersecting_planes: | ||
|
||
=================== | ||
Intersecting planes | ||
=================== | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _quiver3d: | ||
|
||
============== | ||
3D quiver plot | ||
============== | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _stem3d_demo: | ||
|
||
======= | ||
3D stem | ||
======= | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _surface3d: | ||
|
||
===================== | ||
3D surface (colormap) | ||
===================== | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _surface3d_2: | ||
|
||
======================== | ||
3D surface (solid color) | ||
======================== | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _surface3d_3: | ||
|
||
========================= | ||
3D surface (checkerboard) | ||
========================= | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _trisurf3d: | ||
|
||
====================== | ||
Triangular 3D surfaces | ||
====================== | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _trisurf3d_2: | ||
|
||
=========================== | ||
More triangular 3D surfaces | ||
=========================== | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _boxplot_demo: | ||
|
||
======== | ||
Boxplots | ||
======== | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _customized_violin: | ||
|
||
========================= | ||
Violin plot customization | ||
========================= | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _hexbin_demo: | ||
|
||
===================== | ||
Hexagonal binned plot | ||
===================== | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _violinplot: | ||
|
||
================== | ||
Violin plot basics | ||
================== | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _bar3d_simple: | ||
|
||
========================== | ||
bar3d(x, y, z, dx, dy, dz) | ||
========================== | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _surface3d_simple: | ||
|
||
===================== | ||
plot_surface(X, Y, Z) | ||
===================== | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
.. _trisurf3d_simple: | ||
|
||
===================== | ||
plot_trisurf(x, y, z) | ||
===================== | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.. _users-guide-artists: | ||
|
||
+++++++ | ||
Artists | ||
+++++++ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.. _users_guide_axes: | ||
|
||
+++++++++++++++++ | ||
Axes and subplots | ||
+++++++++++++++++ | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is there a reason you introduce labels to a lot of examples? Generally, we've been referencing examples via the doc
:doc:`/gallery/images_contours_and_fiels/contour_demo`
. See also https://matplotlib.org/devdocs/devel/document.html#refer-to-other-documents-and-sections.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.
Because if we have to re-arrange things all these hard links break, whereas labeled references do not break.
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.
IMHO this is a case of YAGNI. We are quite conservative on the structure because it translates to public URLs. And if we really want to change, that’s a quite easy search&replace, which we need to anyway, because our current way of referencing examples is predominantly doc based.
This makes the PR look more complicated and I’ve some reservations whether it’s actually better to reference examples using labels.
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 don't mind it b/c we've done some thrashing on the galleries, but I think it might make both discussions easier if it was spun out into a separate PR
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.
This was a huge barrier to making doc changes 5 or so years ago. Since then we introduced the redirect mechanism which has allowed things to be moved. It is likely true that our predominant way of referencing things is
:doc:
based, I'd argue:ref:
is much more flexible. Certainly:ref:
is used in many places as well.Regardless, I don't think this really affects this PR. I made zero substantive changes to any of the other files - I just added the reference label. I also didn't change any
:doc:
calls elsewhere.Uh oh!
There was an error while loading. Please reload this page.
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.
To give a number: 7 examples have labels. but we have 150 :doc: references.
I beg to differ:
So the effect is at least I'm not looking at this, which is fine as long as you find other reviewers. I'm just giving my perspective. Others would have to comment on why they haven't reviewed.
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.
Again, this isn't new, or just being introduced now - we have had label-based referencing for as long as I have been contributing. All this PR does is add labels, it doesn't change any existing references. If I put in a stand-alone PR with just the labels, that is all it would be - a bunch of labels not used anywhere yet. I can certainly do that if you like, but I'm not sure what the point is.
An aside, for sure, but
:ref:
is used 738 times in our docs, and a quick skim indicates that they are all label based references to elsewhere in the docs.:doc:
is used 291 times. Perhaps you are making a distinction between the gallery and the rest of the docs?Uh oh!
There was an error while loading. Please reload this page.
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.
@jklymak do you have a strong objection to splitting off the labeling PR from the plotting guide PR? I tend to review docs on my phone so it's a lot to scroll past, and as the back and forth with Tim is showing there's a whole separate conversation to be had about labeling.
That's fine, folks do staged PRs all the time. Just say it's for this PR. Or put adding the labels in a separate first commit so reviewers can filter it out.
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 could do both those things if it makes things easier.
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.
Done