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

Behavior of hist() with normed=True changes from v2.0 to v2.1 #9557

Closed
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone
@jakevdp

Description

@jakevdp

Found in the context ofastropy/astropy#6786

When hist() is passed irregular bins withnormed=True, the output is different between matplotlib 2.0 and 2.1. Here is a test script to reproduce the issue:

# Python 3.6importmatplotlib.pyplotaspltimportmatplotlibimportnumpyasnprng=np.random.RandomState(829)t=np.concatenate([rng.randn(100),2+0.1*rng.randn(100),5+3*rng.randn(100)])plt.hist(t,bins=[-5,-3,-2,-1,-0.5,0,2,4,5,10],normed=True)plt.title(f'matplotlib v{matplotlib.__version__}')plt.savefig(f'hist-{matplotlib.__version__}.png')plt.show()

hist-2.0.2.png:
hist-2 0 2

hist-2.1.0.png:
hist-2 1 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp