Skip to content

hist / hist2d inconsistent for plotting single data point #3882

@eyurtsev

Description

@eyurtsev

matplotlib version 1.4.2

hist throws an error when fed with a single data point, but hist2d doesn't.

figure()
hist2d([1], [1]) # works

figure()
hist(1)  # throws a ValueError

The error is: "ValueError: x has only one data point. bins or range kwarg must be given"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions