8000 Masking invalid x and/or weights in hist by dstansby · Pull Request #9706 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Masking invalid x and/or weights in hist #9706

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

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Add test for nans in hist input
  • Loading branch information
dstansby committed Nov 14, 2017
commit 8e2d48e2aad63127ff9632c13c77a36b892da81b
7 changes: 7 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,13 @@ def test_barh_tick_label():
align='center')


def test_hist_nans():
# Check that histogram input data can include nans
fig, ax = plt.subplots()
ax.hist([1, 2, 1, 2, 3, np.nan],
weights=[1, 1, 1, np.nan, 1, 1])


@image_comparison(baseline_images=['hist_log'],
remove_text=True)
def test_hist_log():
Expand Down
0