8000 [Feature request] Functions for "manually" plotting histograms · Issue #6669 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
[Feature request] Functions for "manually" plotting histograms #6669
@smheidrich

Description

@smheidrich

matplotlib's pyplot.hist and pyplot.hist2d functions fill the supplied data into histogram bins and plot them, but very often users will have already done the first step (sorting data into bins) in their own code and are merely interested in presenting their results in a "style" that is evocative of histograms (most commonly: bar chart with no separation for 1D data, colored grid for 2D data).

Right now they can do this by using the pyplot.bar and pyplot.imshow functions for 1D and 2D data, respectively, but they have to fill in a bunch of arguments to make it look like something produced by pyplot.hist or pyplot.hist2d and they have to find out that those two are the right functions for the job in the first place (not very intuitive).

Hence I think it would be good if there were separate functions or maybe just special arguments to pyplot.hist/hist2d that allow you to plot bin values (as opposed to data that is yet to be binned) as histograms that look exactly as if they had been produced by pyplot.hist/hist2d.

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