8000 Error autoscaling histogram with histtype='step' · Issue #841 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Error autoscaling histogram with histtype='step' #841
Closed
@joshualande

Description

@joshualande

I am running into problems where histograms are not autoscaling correctly.

Below is a very simple example which reproduces this problem:

import pylab as P
P.hist([3000,3010, 3012], histtype='step')
P.savefig('test.pdf')

When I run this example using matplotlib v1.1.0 or using the absolute latest version of matplotlib, I obtain an axes which varies from 3000<x<3012 and 0<y<3000 with no visible histogram.

When I add (before saving the plot) the line:

P.gca().set_ylim(ymax=2.1)

I get a reasonable axes range and can see the histogram.

I also get a reasonable axes range when I remove the command histtype='step' or when I use matplotlib v1.0.0.

Thanks for your help,

Joshua

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0