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

Appearance settings

Error autoscaling histogram with histtype='step' #841

Copy link
Copy link
Closed
@joshualande

Description

@joshualande
Issue body actions

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.