About 534,000 results
Open links in new tab
  1. How to plot a histogram using Matplotlib in Python with a list of …

    Mar 5, 2024 · If I have a list of y-values that correspond to bar height and a list of x-value strings, how do I plot a histogram using matplotlib.pyplot.hist? Related: matplotlib.pyplot.bar.

  2. Fitting a histogram with python - Stack Overflow

    "fit this histogram with a gaussian function"? Usually we just compute the mean and standard deviation of the histogram directly. What do you mean by "fit this histogram with a gaussian …

  3. python - Histogram Matplotlib - Stack Overflow

    Mar 16, 2011 · 15 I know this does not answer your question, but I always end up on this page, when I search for the matplotlib solution to histograms, because the simple histogram_demo …

  4. Plot histogram with colors taken from colormap - Stack Overflow

    I want to plot a simple 1D histogram where the bars should follow the color-coding of a given colormap. Here's an MWE: import numpy as n import matplotlib.pyplot as plt # Random …

  5. python - Add KDE on to a histogram - Stack Overflow

    Oct 25, 2015 · I would like to add a density plot to my histogram diagram. I know something about pdf function but I've got confused and other similar questions were not helpful. from scipy.stats …

  6. How to center labels in histogram plot - Stack Overflow

    0 To center the labels on a matplotlib histogram of discrete values is enough to define the "bins" as a list of bin boundaries. python

  7. python - Plot an histogram with y-axis as percentage (using ...

    Jul 23, 2018 · When I plot a histogram using the hist() function, the y-axis represents the number of occurrences of the values within a bin. Instead of the number of occurrences, I would like to …

  8. Setting a relative frequency in a matplotlib histogram

    Mar 19, 2012 · Hist () function does the job perfectly for plotting the absolute histogram. However, I cannot figure out how to represent it in a relative frequency format - I would like to have it as …

  9. pyplot: draw a smooth curve over a histogram - Stack Overflow

    Feb 11, 2021 · There is a histogram rendered using a DataFrame as a data source: import seaborn as sns import matplotlib.pyplot as plt plt.rcParams ["figure.figsize"] = (14,14) df …

  10. matplotlib - Python: Frequency of occurrences - Stack Overflow

    Mar 2, 2014 · If you don't specify what bins to use, np.histogram and pyplot.hist will use a default setting, which is to use 10 equal bins. The left border of the 1st bin is the smallest value and …