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

[Bug]: Histogram ignoreslw argument, no warning or error #29977

Closed as duplicate of#28884
@gullbrekken

Description

@gullbrekken

Bug summary

ax.hist ignoreslw argument. Must uselinewidth in order to change the thickness of the lines.

Code for reproduction

# Test of lw vs linewidth in histogramshistogram1= [1]histogram2= [3]histogram3= [5]fig,ax=plt.subplots(figsize=(8,8))ax.hist(histogram1,bins=1,density=True,histtype='step',color='tab:blue',lw=1,label='lw=1')ax.hist(histogram2,bins=1,density=True,histtype='step',color='tab:orange',lw=3,label='lw=3')ax.hist(histogram3,bins=1,density=True,histtype='step',color='tab:green',linewidth=3,label='linewidth=3')ax.legend()plt.show()print(matplotlib.__version__)

Actual outcome

Image

Expected outcome

Usinglw andlinewidth produce same output.

Additional information

This was not a problem with an earlier version of Matplotlib (don't remember the version unfortunately, but definitely 3.x something).

Operating system

Ubuntu 24.04.2 LTS

Matplotlib Version

3.10.0

Matplotlib Backend

agg

Python version

3.12.3

Jupyter version

4.2.5

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp