Learn Python
Learn Data Structure & Algorithm
Learn Numpy
Learn Pandas
Matplotlib Introduction
Matplotlib Bar Plot
Matplotlib Pie Chart
Matplotlib Hist Plot
Matplotlib Line Plot
Matplotlib Scatter Plot
Matplotlib Subplot
Matplotlib Save image
Learn Seaborn
Learn Statistics
Learn Math
Learn MATLAB
Learn Machine learning
Learn Github
Learn OpenCV
Learn Deep Learning
Learn MySQL
Learn MongoDB
Learn Web scraping
Learn Excel
Learn Power BI
Learn Tableau
Learn Docker
Learn Hadoop
It is used to represent the distribution of numerical data. Here the data is divided into a series of bins. In histogram each bar height represents the number of data points that comes inside that bins.
To create Histogram write module_name.hist(). In the bracket pass parameter.
Some mandatory parameters:
The first parameter is a variable name where you stored values for creating a histogram.
labels=["pass names as list"]. Used to set labels for every section.
Some other parameters:
colors=["colors name as a list"].Used to give colors of bars.Color name, RGB
color, hex color, etc.
rwidth=0.0 to 1.0.Used to increase or decrease bar width.
How to give title,labels,legend,grid?
Title
For title write module_name.title().
In the bracket write the title as a string. For font size write fontsize:value . Between title name and font
size parameter give a coma.
xlabel
For label at x-axis write module_name.ylabel().
In the bracket write the label name as a string. For font size write fontsize:value. Between label name and
font size parameter give a coma.
ylabel
For the label at the y-axis write module_name. ylabel().
In the bracket write the label name as a string.
For font size write fontsize:value. Between label name and font size parameter give a coma.
legend
If there are multiple bars and every bar defines different things, then you should use the legend to give a
name for each bar so that you can understand which bar is for why.To give legend first write
module_name.legend().Pass all the names as a list in the bracket. To set the position use the loc parameter.
You can give the value of the loc parameter between 0 to 3
grid
For grid first write module_name.grid().
Some parameters of the grid are
1.color: used to set the color of the grid.Example: color="green".
2.linestyle: used to set grid line style.Example: linestyle="--".
3.linewidth: used to set line width of the grid.example: linewidth=2.