Informatics Practices

What is histogram ? How do you create histograms in Python ?

PyPlot

3 Likes

Answer

A histogram is a summarization tool for discrete or continuous data, providing a visual interpretation of numerical data by showing the number of data points that fall within a specified range of values.

The hist() function of the Pyplot module is used to create and plot a histogram from a given sequence of numbers. The syntax for using the hist() function in Pyplot is as follows:

matplotlib.pyplot.hist(x, bins = None, cumulative = False, histtype = 'bar', align = 'mid', orientation = 'vertical', ).

Answered By

2 Likes


Related Questions