René's URL Explorer Experiment


Title: Python Histogram Plotting: NumPy, Matplotlib, pandas & Seaborn – Real Python

Open Graph Title: Python Histogram Plotting: NumPy, Matplotlib, pandas & Seaborn – Real Python

Description: In this tutorial, you'll be equipped to make production-quality, presentation-ready Python histogram plots with a range of choices and features. It's your one-stop shop for constructing & manipulating histograms with Python's scientific stack.

Open Graph Description: In this tutorial, you'll be equipped to make production-quality, presentation-ready Python histogram plots with a range of choices and features. It's your one-stop shop for constructing & manipulating histograms with Python's scientific stack.

Mail addresses
?subject=Python article for you&body=Python Histogram Plotting: NumPy, Matplotlib, pandas & Seaborn on Real Python https://realpython.com/python-histograms/

Opengraph URL: https://realpython.com/python-histograms/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
{
  "@context": "http://schema.org",
  "@type": "Article",
  "headline": "Python Histogram Plotting: NumPy, Matplotlib, pandas & Seaborn",
  "image": {
    "@type": "ImageObject",
    "url": "https://files.realpython.com/media/Python_Histograms_Watermark.c4daed2c983b.jpg",
    "width": 1920,
    "height": 1080
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://realpython.com/python-histograms/",
    "lastReviewed": "2023-06-27",
    "author": {
      "@type": "Person",
      "name": "Brad Solomon",
      "image": "https://realpython.com/cdn-cgi/image/width=1188,height=1188,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Screen_Shot_2021-09-28_at_3.13.21_PM.3310c56e90bd.jpg",
      "url": "https://realpython.com/team/bsolomon/",
      "affiliation": {
        "@type": "Organization",
        "@id": "https://realpython.com/#organization",
        "name": "Real Python",
        "url": "https://realpython.com",
        "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
      }
    },
    "reviewedBy": [
      {
        "@type": "Person",
        "name": "Adriana Cutenco",
        "image": "https://realpython.com/cdn-cgi/image/width=900,height=900,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/acutenco.676e4197c133.jpg",
        "url": "https://realpython.com/team/acutenco/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Dan Bader",
        "image": "https://realpython.com/cdn-cgi/image/width=1000,height=1000,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/daniel-square.d58bf4388750.jpg",
        "url": "https://realpython.com/team/dbader/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Joanna Jablonski",
        "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/jjablonksi-avatar.e37c4f83308e.jpg",
        "url": "https://realpython.com/team/jjablonski/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      }
    ]
  },
  "datePublished": "2018-07-02T14:00:00+00:00",
  "dateModified": "2023-06-27T17:33:15.342245+00:00",
  "publisher": {
    "@type": "Organization",
    "@id": "https://realpython.com/#organization",
    "name": "Real Python",
    "url": "https://realpython.com",
    "logo": {
      "@type": "ImageObject",
      "url": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png",
      "width": 512,
      "height": 512
    },
    "description": "Real Python is a leading provider of online Python education and one of the largest language-specific online communities for software developers. It publishes high-quality learning resources, such as tutorials, books, and courses to an audience of millions of developers, data scientists, and machine learning engineers each month.",
    "slogan": "Become a Python Expert",
    "email": "info@realpython.com",
    "sameAs": [
      "https://github.com/realpython",
      "https://www.youtube.com/realpython",
      "https://twitter.com/realpython",
      "https://x.com/realpython",
      "https://www.linkedin.com/company/realpython-com/",
      "https://www.facebook.com/learnrealpython",
      "https://www.instagram.com/realpython",
      "https://www.tiktok.com/@realpython.com"
    ]
  },
  "author": {
    "@type": "Person",
    "name": "Brad Solomon",
    "image": "https://realpython.com/cdn-cgi/image/width=1188,height=1188,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Screen_Shot_2021-09-28_at_3.13.21_PM.3310c56e90bd.jpg",
    "url": "https://realpython.com/team/bsolomon/",
    "affiliation": {
      "@type": "Organization",
      "@id": "https://realpython.com/#organization",
      "name": "Real Python",
      "url": "https://realpython.com",
      "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
    }
  },
  "description": "In this tutorial, you'll be equipped to make production-quality, presentation-ready Python histogram plots with a range of choices and features. It's your one-stop shop for constructing & manipulating histograms with Python's scientific stack."
}

authorReal Python
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/Python_Histograms_Watermark.c4daed2c983b.jpg
og:imagehttps://files.realpython.com/media/Python_Histograms_Watermark.c4daed2c983b.jpg
twitter:creator@realpython
og:typearticle

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/python-histograms/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/quizzes/
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Code Mentor →BetaPersonalized code assistance & learning toolshttps://realpython.com/mentor/
Unlock All Content →https://realpython.com/account/join/
More https://realpython.com/python-histograms/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Tutorial Writerhttps://realpython.com/write-for-us/
Become a Video Instructorhttps://realpython.com/become-an-instructor/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?next=%2Fpython-histograms%2F
Browse Topicshttps://realpython.com/tutorials/all/
Guided Learning Pathshttps://realpython.com/learning-paths/
Basicshttps://realpython.com/search?level=basics
Intermediatehttps://realpython.com/search?level=intermediate
Advancedhttps://realpython.com/search?level=advanced
aihttps://realpython.com/tutorials/ai/
algorithmshttps://realpython.com/tutorials/algorithms/
apihttps://realpython.com/tutorials/api/
best-practiceshttps://realpython.com/tutorials/best-practices/
careerhttps://realpython.com/tutorials/career/
communityhttps://realpython.com/tutorials/community/
databaseshttps://realpython.com/tutorials/databases/
data-sciencehttps://realpython.com/tutorials/data-science/
data-structureshttps://realpython.com/tutorials/data-structures/
data-vizhttps://realpython.com/tutorials/data-viz/
devopshttps://realpython.com/tutorials/devops/
djangohttps://realpython.com/tutorials/django/
dockerhttps://realpython.com/tutorials/docker/
editorshttps://realpython.com/tutorials/editors/
flaskhttps://realpython.com/tutorials/flask/
front-endhttps://realpython.com/tutorials/front-end/
gamedevhttps://realpython.com/tutorials/gamedev/
guihttps://realpython.com/tutorials/gui/
machine-learninghttps://realpython.com/tutorials/machine-learning/
newshttps://realpython.com/tutorials/news/
numpyhttps://realpython.com/tutorials/numpy/
projectshttps://realpython.com/tutorials/projects/
pythonhttps://realpython.com/tutorials/python/
stdlibhttps://realpython.com/tutorials/stdlib/
testinghttps://realpython.com/tutorials/testing/
toolshttps://realpython.com/tutorials/tools/
web-devhttps://realpython.com/tutorials/web-dev/
web-scrapinghttps://realpython.com/tutorials/web-scraping/
Table of Contentshttps://realpython.com/python-histograms/#toc
Histograms in Pure Pythonhttps://realpython.com/python-histograms/#histograms-in-pure-python
Building Up From the Base: Histogram Calculations in NumPyhttps://realpython.com/python-histograms/#building-up-from-the-base-histogram-calculations-in-numpy
Visualizing Histograms with Matplotlib and pandashttps://realpython.com/python-histograms/#visualizing-histograms-with-matplotlib-and-pandas
Plotting a Kernel Density Estimate (KDE)https://realpython.com/python-histograms/#plotting-a-kernel-density-estimate-kde
A Fancy Alternative with Seabornhttps://realpython.com/python-histograms/#a-fancy-alternative-with-seaborn
Other Tools in pandashttps://realpython.com/python-histograms/#other-tools-in-pandas
Alright, So Which Should I Use?https://realpython.com/python-histograms/#alright-so-which-should-i-use
https://realpython.com/feedback/survey/article/python-histograms/liked/?from=article-sidebar
https://realpython.com/feedback/survey/article/python-histograms/disliked/?from=article-sidebar
Histogram Plotting in Python: NumPy, Matplotlib, Pandas & Seaborn 39m · 8 lessons https://realpython.com/courses/python-histograms/
Brad Solomonhttps://realpython.com/python-histograms/#author
https://realpython.com/python-histograms/#reader-comments
basicshttps://realpython.com/tutorials/basics/
data-sciencehttps://realpython.com/tutorials/data-science/
data-vizhttps://realpython.com/tutorials/data-viz/
numpyhttps://realpython.com/tutorials/numpy/
Histograms in Pure Pythonhttps://realpython.com/python-histograms/#histograms-in-pure-python
Building Up From the Base: Histogram Calculations in NumPyhttps://realpython.com/python-histograms/#building-up-from-the-base-histogram-calculations-in-numpy
Visualizing Histograms with Matplotlib and pandashttps://realpython.com/python-histograms/#visualizing-histograms-with-matplotlib-and-pandas
Plotting a Kernel Density Estimate (KDE)https://realpython.com/python-histograms/#plotting-a-kernel-density-estimate-kde
A Fancy Alternative with Seabornhttps://realpython.com/python-histograms/#a-fancy-alternative-with-seaborn
Other Tools in pandashttps://realpython.com/python-histograms/#other-tools-in-pandas
Alright, So Which Should I Use?https://realpython.com/python-histograms/#alright-so-which-should-i-use
Remove adshttps://realpython.com/account/join/
Histogram Plotting in Python: NumPy, Matplotlib, Pandas & Seabornhttps://realpython.com/courses/python-histograms/
Python and statisticshttps://realpython.com/python-statistics/
pandashttps://realpython.com/pandas-python-explore-dataset/
probability distributionhttps://en.wikipedia.org/wiki/Probability_distribution
https://files.realpython.com/media/commute_times.621e5b1ce062.png
Click here to get access to a free two-page Python histograms cheat sheethttps://realpython.com/bonus/histograms-cheatsheet/
https://realpython.com/python-histograms/#histograms-in-pure-python
dictionaryhttps://docs.python.org/3/tutorial/datastructures.html#dictionaries
subclasseshttps://github.com/python/cpython/blob/7f1bcda9bc3c04100cb047373732db0eba00e581/Lib/collections/__init__.py#L466
C functionhttps://github.com/python/cpython/blob/a5c42284e69fb309bdd17ee8c1c120d1be383012/Modules/_collectionsmodule.c#L2250
variablehttps://realpython.com/python-variables/
output formattinghttps://docs.python.org/tutorial/inputoutput.html#fancier-output-formatting
sorted()https://realpython.com/python-sort/
generator expressionhttps://realpython.com/introduction-to-python-generators/
random.seed()https://docs.python.org/library/random.html#random.seed
PRNGhttps://en.wikipedia.org/wiki/Pseudorandom_number_generator
random datahttps://realpython.com/python-random/
Mersenne Twisterhttps://en.wikipedia.org/wiki/Mersenne_Twister
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-histograms/#building-up-from-the-base-histogram-calculations-in-numpy
PDFhttps://en.wikipedia.org/wiki/Probability_density_function
NumPy’shttps://realpython.com/numpy-array-programming/
Laplace distributionhttps://en.wikipedia.org/wiki/Laplace_distribution
normal distributionhttps://realpython.com/numpy-random-normal/
np.histogram()https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html
by NumPyhttps://github.com/numpy/numpy/blob/6a58e25703cbecb6786faa09a04ae2ec8221348b/numpy/lib/function_base.py#L432-L844
np.bincount()https://docs.scipy.org/doc/numpy/reference/generated/numpy.bincount.html
np.searchsorted()https://docs.scipy.org/doc/numpy/reference/generated/numpy.searchsorted.html
https://realpython.com/python-histograms/#visualizing-histograms-with-matplotlib-and-pandas
Python packageshttps://realpython.com/python-modules-packages/
Matplotlibhttps://realpython.com/python-matplotlib-guide/
https://files.realpython.com/media/my_very_own_histogram.d411ea1cb95c.png
Choosing Histogram Binshttp://docs.astropy.org/en/stable/visualization/histogram.html
uses matplotlib.pyplot.hist()https://github.com/pandas-dev/pandas/blob/cbec58eacd8e9cd94b7f42351b8de4559c250909/pandas/plotting/_core.py#L1310
https://files.realpython.com/media/commute_times.621e5b1ce062.png
DataFramehttps://realpython.com/pandas-dataframe/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-histograms/#plotting-a-kernel-density-estimate-kde
https://files.realpython.com/media/a_vs_b.7528322a9e65.png
gaussian_kde()https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.gaussian_kde.html
https://files.realpython.com/media/analytic_v_estimated.44711de28f1d.png
stats subpackagehttps://docs.scipy.org/doc/scipy/reference/stats.html
LaTexhttps://matplotlib.org/users/usetex.html
https://realpython.com/python-histograms/#a-fancy-alternative-with-seaborn
https://files.realpython.com/media/seaborn_distplot.b10bb7c29d85.png
https://files.realpython.com/media/seaborn_fitted.106107494ccf.png
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-histograms/#other-tools-in-pandas
pandas.cut()https://pandas.pydata.org/pandas-docs/stable/generated/pandas.cut.html
utilize Cython codehttps://github.com/pandas-dev/pandas/tree/master/pandas/_libs
https://realpython.com/python-histograms/#alright-so-which-should-i-use
collections.Counter()https://docs.python.org/3.6/library/collections.html#collections.Counter
np.histogram()https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html
np.bincount()https://docs.scipy.org/doc/numpy/reference/generated/numpy.bincount.html
np.digitize()https://docs.scipy.org/doc/numpy/reference/generated/numpy.digitize.html
Series.plot.hist()https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.plot.hist.html
DataFrame.plot.hist()https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.plot.hist.html
Series.value_counts()https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.value_counts.html
cut()https://pandas.pydata.org/pandas-docs/stable/generated/pandas.cut.html
Series.plot.kde()https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.plot.kde.html
DataFrame.plot.kde()https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.plot.kde.html
visualization docshttps://pandas.pydata.org/pandas-docs/stable/visualization.html
pyplot.hist()https://matplotlib.org/api/_as_gen/matplotlib.pyplot.hist.html
object-oriented frameworkhttps://realpython.com/python-matplotlib-guide/
distplot()https://seaborn.pydata.org/generated/seaborn.distplot.html
Click here to get access to a free two-page Python histograms cheat sheethttps://realpython.com/bonus/histograms-cheatsheet/
scripthttps://github.com/realpython/materials/tree/master/histograms
don’t use a pie charthttp://www.businessinsider.com/pie-charts-are-the-worst-2013-6
https://realpython.com/feedback/survey/article/python-histograms/liked/?from=article-footer
https://realpython.com/feedback/survey/article/python-histograms/disliked/?from=article-footer
Histogram Plotting in Python: NumPy, Matplotlib, Pandas & Seabornhttps://realpython.com/courses/python-histograms/
https://realpython.com/team/bsolomon/
» More about Bradhttps://realpython.com/team/bsolomon/
https://realpython.com/team/acutenco/
Adrianahttps://realpython.com/team/acutenco/
https://realpython.com/team/dbader/
Danhttps://realpython.com/team/dbader/
https://realpython.com/team/jjablonski/
Joannahttps://realpython.com/team/jjablonski/
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-histograms
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-histograms
https://realpython.com/feedback/survey/article/python-histograms/liked/?from=article-comments
https://realpython.com/feedback/survey/article/python-histograms/disliked/?from=article-comments
LinkedInhttps://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Frealpython.com%2Fpython-histograms%2F
Twitterhttps://twitter.com/intent/tweet/?text=Interesting%20Python%20article%20on%20%40realpython%3A%20Python%20Histogram%20Plotting%3A%20NumPy%2C%20Matplotlib%2C%20pandas%20%26%20Seaborn&url=https%3A%2F%2Frealpython.com%2Fpython-histograms%2F
Blueskyhttps://bsky.app/intent/compose?text=Interesting%20Python%20article%20on%20%40realpython.com%3A%20Python%20Histogram%20Plotting%3A%20NumPy%2C%20Matplotlib%2C%20pandas%20%26%20Seaborn%20https%3A%2F%2Frealpython.com%2Fpython-histograms%2F
Facebookhttps://facebook.com/sharer/sharer.php?u=https%3A%2F%2Frealpython.com%2Fpython-histograms%2F
Get tips for asking good questionshttps://realpython.com/python-beginner-tips/#tip-9-ask-good-questions
get answers to common questions in our support portalhttps://support.realpython.com
Real Python Community Chathttps://realpython.com/community/
“Office Hours” Live Q&A Sessionhttps://realpython.com/office-hours/
basicshttps://realpython.com/tutorials/basics/
data-sciencehttps://realpython.com/tutorials/data-science/
data-vizhttps://realpython.com/tutorials/data-viz/
numpyhttps://realpython.com/tutorials/numpy/
Histogram Plotting in Python: NumPy, Matplotlib, Pandas & Seabornhttps://realpython.com/courses/python-histograms/?utm_source=realpython&utm_medium=web&utm_campaign=related-course&utm_content=python-histograms
pandas Sort: Your Guide to Sorting Data in Pythonhttps://realpython.com/pandas-sort-python/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python-histograms
https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-histograms%2F
Continue »https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-histograms%2F
Sign-Inhttps://realpython.com/account/login/?next=/python-histograms/
Start Herehttps://realpython.com/start-here/
Learning Resourceshttps://realpython.com/search
Code Mentorhttps://realpython.com/mentor/
Python Referencehttps://realpython.com/ref/
Python Cheat Sheethttps://realpython.com/cheatsheets/python/
Support Centerhttps://support.realpython.com/
Learning Pathshttps://realpython.com/learning-paths/
Quizzes & Exerciseshttps://realpython.com/quizzes/
Browse Topicshttps://realpython.com/tutorials/all/
Live Courseshttps://realpython.com/live/
Bookshttps://realpython.com/books/
Podcasthttps://realpython.com/podcasts/rpp/
Newsletterhttps://realpython.com/newsletter/
Community Chathttps://realpython.com/community/
Office Hourshttps://realpython.com/office-hours/
Learner Storieshttps://realpython.com/learner-stories/
Plans & Pricinghttps://realpython.com/account/join/
Team Planshttps://realpython.com/account/join-team/
For Businesshttps://realpython.com/account/join-team/inquiry/
For Schoolshttps://realpython.com/account/join-team/education-inquiry/
Reviewshttps://realpython.com/learner-stories/
About Ushttps://realpython.com/about/
Teamhttps://realpython.com/team/
Mission & Valueshttps://realpython.com/mission/
Editorial Guidelineshttps://realpython.com/editorial-guidelines/
Sponsorshipshttps://realpython.com/sponsorships/
Careershttps://realpython.workable.com
Press Kithttps://realpython.com/media-kit/
Merchhttps://realpython.com/merch
https://www.youtube.com/realpython
https://x.com/realpython
https://www.linkedin.com/company/realpython-com
https://www.facebook.com/LearnRealPython
https://github.com/realpython/
Privacy Policyhttps://realpython.com/privacy-policy/
Terms of Usehttps://realpython.com/terms/
Securityhttps://realpython.com/security/
Contacthttps://realpython.com/contact/
https://realpython.com/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.