Skip to content

'stepfilled' histogram is not filled properly when setting yscale('log') #1727

Closed
@gitcheng

Description

@gitcheng

I am using 1.3.x that I just cloned today. The histogram is not filled properly in log scale if I set yscale('log'). However, if I use hist(..., log=True), it looks fine.

import matplotlib.pyplot as plt
import numpy as np
x= np.arange(10)
plt.subplot(211)
plt.yscale('log')
plt.hist(x, weights=x, histtype='stepfilled')
plt.title('Use yscale(\'log\')')
plt.subplot(212)
plt.hist(x, weights=x, histtype='stepfilled', log=True)
plt.title('Use hist(..., log=True)')
plt.show()

stepfilled_log

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