Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug]: when using histtype, linestyle is not carried through to plot #29955

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
joemasiero opened this issue Apr 21, 2025 · 1 comment
Closed

Comments

@joemasiero
Copy link

Bug summary

Prior to the current matplotlib version, when using histtype='step' in pyplot.hist you could customize the linestyle with that command. Now, linestyle is not being used and all lines are coming out as 'solid'

Code for reproduction

import matplotlib.pyplot as plt
dat=[0,1,2,3,4,5,2,3,4,5,4,5,5]
plt.figure()
plt.hist(dat,bins=3,ls='solid',color='k',histtype='step')
plt.show()
plt.figure()
plt.hist(dat,bins=3,ls='dotted',color='k',histtype='step')
plt.show()

Actual outcome

two plots, both showing the same graphic

Expected outcome

the second plot should have a dotted line, not a solid line

Additional information

No response

Operating system

OS/X

Matplotlib Version

3.10.0

Matplotlib Backend

macosx

Python version

Python 3.11.9

Jupyter version

n/a

Installation

pip

@jklymak
Copy link
Member

jklymak commented Apr 21, 2025

This was fixed by #29719 and will be available 3.10.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants