-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: Standardize example titles - part 2 #28641
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
""" | ||
========== | ||
Ribbon Box | ||
Ribbon box | ||
========== | ||
|
||
""" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
""" | ||
=========== | ||
Fill Spiral | ||
Fill spiral | ||
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. Out of scope yes but make it OO? |
||
=========== | ||
|
||
""" | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,7 @@ | ||||||
""" | ||||||
========================== | ||||||
Labeling a pie and a donut | ||||||
========================== | ||||||
============================= | ||||||
A pie and a donut with labels | ||||||
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.
Suggested change
I think the labels here work more like annotations |
||||||
============================= | ||||||
|
||||||
Welcome to the Matplotlib bakery. We will create a pie and a donut | ||||||
chart through the `pie method <matplotlib.axes.Axes.pie>` and | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,7 @@ | ||||||
""" | ||||||
============================================= | ||||||
Plotting multiple lines with a LineCollection | ||||||
============================================= | ||||||
========================================== | ||||||
Plot multiple lines using a LineCollection | ||||||
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.
Suggested change
Plot is implied? Or say why they'd want to use a LineCollection over a loop? |
||||||
========================================== | ||||||
|
||||||
Matplotlib can efficiently draw multiple lines at once using a `~.LineCollection`. | ||||||
""" | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,7 @@ | ||||||
""" | ||||||
========================================== | ||||||
Producing multiple histograms side by side | ||||||
========================================== | ||||||
================================ | ||||||
Multiple histograms side by side | ||||||
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.
Suggested change
Not quite accurate, really it's a |
||||||
================================ | ||||||
|
||||||
This example plots horizontal histograms of different samples along | ||||||
a categorical x-axis. Additionally, the histograms are plotted to | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,7 @@ | ||||||
""" | ||||||
=============================================== | ||||||
Programmatically controlling subplot adjustment | ||||||
=============================================== | ||||||
=========================================== | ||||||
Programmatically control subplot adjustment | ||||||
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.
Suggested change
Something to convey that this should be in user guide or tutorials is not an example is intended to show you how to write a custom layout manager. Biggest objection is programmatically cause that's just what using mpl is |
||||||
=========================================== | ||||||
|
||||||
.. note:: | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,7 @@ | ||||||
""" | ||||||
======================================================= | ||||||
Using Gridspec to make multi-column/row subplot layouts | ||||||
======================================================= | ||||||
============================================= | ||||||
Gridspec for multi-column/row subplot layouts | ||||||
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.
Suggested change
|
||||||
============================================= | ||||||
|
||||||
`.GridSpec` is a flexible way to layout | ||||||
subplot grids. Here is an example with a 3x3 grid, and | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
""" | ||
================== | ||
Auto-wrapping text | ||
================== | ||
============== | ||
Auto-wrap text | ||
============== | ||
|
||
Matplotlib can wrap text automatically, but if it's too long, the text will be | ||
displayed slightly outside of the boundaries of the axis anyways. | ||
Matplotlib can wrap text automatically, but if it's too long, the text will | ||
still be displayed slightly outside the boundaries of the axis. | ||
Comment on lines
+6
to
+7
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. Not sure what this means since you just told me it can wrap text automatically and this may be better as two sentences |
||
|
||
Note: Auto-wrapping does not work together with | ||
``savefig(..., bbox_inches='tight')``. The 'tight' setting rescales the canvas | ||
|
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.
So far, there's only one case of formatting example titles (
plt.subplots
). I feel it's slightly better to format function names as literal rather than just have them as plain text. But no strong opinion. We can also leave out the formatting if desired.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.
If sphinx doesn't complain, I fully support formatting function names this way