Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for multiple hatches, edgecolors and linewidths in histograms#28073

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
QuLogic merged 13 commits intomatplotlib:mainfromImpaler343:histogram
Jul 20, 2024
Merged
Changes from1 commit
Commits
Show all changes
13 commits
Select commitHold shift + click to select a range
1a6ec0f
Add support for multiple hatches, edgecolor and linewidth in histograms
Impaler343Apr 13, 2024
0e52daa
Add hatch, linewidth and edgecolor parameters to multihist example
Impaler343Apr 14, 2024
34df06a
Add test for added parameters
Impaler343Apr 25, 2024
4fcb709
Reduced to 13 tests in total
Impaler343Jun 16, 2024
347ce22
Added color semantics test and modified vectorized parameters test
Impaler343Jun 25, 2024
d7ffeaa
Added None patch test
Impaler343Jun 28, 2024
9024be4
Heading edit
Impaler343Jun 28, 2024
3bfca5f
Simplified test
Impaler343Jun 28, 2024
6029e32
Updated none patch test
Impaler343Jul 1, 2024
0349e7d
Made None patch condition explicit
Impaler343Jul 2, 2024
d1a8079
Made suggested changes
Impaler343Jul 9, 2024
9a813f4
Added version-added directive
Impaler343Jul 10, 2024
43ce57d
Made suggested changes
Impaler343Jul 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Add hatch, linewidth and edgecolor parameters to multihist example
  • Loading branch information
@Impaler343
Impaler343 committedJun 27, 2024
commit0e52daad459d0f3b1f1238016533ebf4583a3438
13 changes: 9 additions & 4 deletionsgalleries/examples/statistics/histogram_multihist.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,19 +27,24 @@
fig, ((ax0, ax1), (ax2, ax3)) = plt.subplots(nrows=2, ncols=2)

colors = ['red', 'tan', 'lime']
ax0.hist(x, n_bins, density=True, histtype='bar', color=colors, label=colors)
ax0.hist(x, n_bins, density=True, histtype='bar', color=colors,
label=colors, hatch=['o', '*', '.'],
edgecolor=['black', 'red', 'blue'], linewidth=[1, 2, 3])
ax0.legend(prop={'size': 10})
ax0.set_title('bars with legend')

ax1.hist(x, n_bins, density=True, histtype='bar', stacked=True)
ax1.hist(
x, n_bins, density=True, histtype="bar", stacked=True,
edgecolor=["black", "yellow", "blue"])
ax1.set_title('stacked bar')

ax2.hist(x, n_bins, histtype='step', stacked=True, fill=False)
ax2.hist(x, n_bins, histtype='step', stacked=True, fill=False,
linewidth=[1, 2, 3])
ax2.set_title('stack step (unfilled)')

# Make a multiple-histogram of data-sets with different length.
x_multi = [np.random.randn(n) for n in [10000, 5000, 2000]]
ax3.hist(x_multi, n_bins, histtype='bar')
ax3.hist(x_multi, n_bins, histtype='bar', hatch=['\\', '/', '-'])
ax3.set_title('different sample sizes')

fig.tight_layout()
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp