-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24470 from story645/pie
[ENH] hatch keyword for pie + some pie documentation
- Loading branch information
Showing
4 changed files
with
73 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
``hatch`` parameter for pie | ||
------------------------------------------- | ||
|
||
`~matplotlib.axes.Axes.pie` now accepts a *hatch* keyword that takes as input | ||
a hatch or list of hatches: | ||
|
||
.. plot:: | ||
:include-source: true | ||
:alt: Two pie charts, identified as ax1 and ax2, both have a small blue slice, a medium orange slice, and a large green slice. ax1 has a dot hatching on the small slice, a small open circle hatching on the medium slice, and a large open circle hatching on the large slice. ax2 has the same large open circle with a dot hatch on every slice. | ||
|
||
fig, (ax1, ax2) = plt.subplots(ncols=2) | ||
x = [10, 30, 60] | ||
|
||
ax1.pie(x, hatch=['.', 'o', 'O']) | ||
ax2.pie(x, hatch='.O') | ||
|
||
ax1.set_title("hatch=['.', 'o', 'O']") | ||
ax2.set_title("hatch='.O'") |
This file contains 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 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 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