Python Programming
Python Programming
Python
Key Features
Various modules(Libraries)
Matplotlib
Plotting of various graphs using matplotlib
Types of graphs
Line chart
Bar Plot
Scatter Plot
Histogram
What is Python?
1. Easy to Code
2. Easy to Read
3. Free and Open-Source
4. Interpreted
5. Robust Standard Library
6. Object-Oriented and Procedure-Oriented
7. Extensible
8. Portable
Some Python Libraries
NumPy
Pandas
Random
Matplotlib
OpenCV
Pillow
sqlite3
Matplotlib
Line Plot.
Bar Plot.
Scatter Plot.
Pie Plot.
Area Plot.
Histogram Plot.
Line Plot
Line plots are drawn by joining straight lines connecting data points where the x-axis
and y-axis values intersect. Line plots are the simplest form of representing data.
In Matplotlib, the plot() function is used for plotting .
Bar Plot
The bar plots are vertical/horizontal rectangular graphs that show data comparison
where you can gauge the changes over a period represented in another axis (mostly the
X-axis).
Each bar can store the value of one or multiple data divided in a ratio.
The longer a bar becomes, the greater the value it holds.
In Matplotlib, we use the bar() or barh() function to represent it.
Scatter Plot
We can implement the scatter (previously called XY) plots while comparing various
data variables to determine the connection between dependent and independent
variables.
The data gets expressed as a collection of points clustered together meaningfully.
Here each value has one variable (x) determining the relationship with the other (Y).
Histogram
We can use a histogram plot when the data remains distributed, whereas we can use a
bar graph to compare two entities.
Both histogram and bar plot look alike but are used in different scenarios.
In Matplotlib, the hist() function represents this.