Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Feature request: show bars in plt.hist #12874

Closed as not planned
Closed as not planned
Labels
status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Actiontopic: histtopic: rcparams
@rosgori

Description

@rosgori

Feature request

Summary

With the new style of plotting (after version 1.5), you cannot distinguish the bars onplt.hist. Take for example the old way:

importmatplotlib.pyplotaspltimportrandoml_n= []for_inrange(2000):l_n.append(random.betavariate(5,25))withplt.style.context('classic'):plt.hist(l_n,bins=20)plt.show()

Unfortunately, I cannot upload images. Nevertheless, you can see the bars. Now, this:

plt.hist(l_n,bins=20)plt.show()

You only see the silhouette of the histogram, not the bars. An easy way to solve this:

plt.hist(l_n,bins=20,edgecolor='w')plt.show()

edgecolor='w' would be the default option (I would prefer white because it looks good with all the styles). What do you think?

By the way, if you want to compare with other software, I think all of them show bars. And a quick searchshows...

Matplotlib version

  • Operating system: Ubuntu 16.04.5 LTS
  • Matplotlib version: 3.0.1
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg
  • Python version: 3.6.6
  • Jupyter version (if applicable): 7.1.1
  • Other libraries:
  • How I installed matplotlib: conda

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Actiontopic: histtopic: rcparams

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp