Data Visualization Graphs for ML
Data Visualization Graphs for ML
import matplotlib
print(matplotlib.__version__)
Pyplot
• Most of the Matplotlib utilities lies under the pyplot submodule, and
are usually imported under the plt alias:
• Syntax:
import matplotlib.pyplot as plt
Marker Description
'o' Circle
'*' Star
'.' Point
',' Pixel
'x' X
'X' X (filled)
'+' Plus
'P' Plus (filled)
's' Square
'D' Diamond
'd' Diamond (thin)
'p' Pentagon
'H' Hexagon
'h' Hexagon
'v' Triangle Down
'^' Triangle Up
'<' Triangle Left
'>' Triangle Right
'1' Tri Down
'2' Tri Up
'3' Tri Left
'4' Tri Right
'|' Vline
'_' Hline
Color Syntax Description
'r' Red
'g' Green
'b' Blue
'c' Cyan
'm' Magenta
'y' Yellow
'k' Black
'w' White
Line Syntax Description
1. All rectangular bars should have equal width and should have equal
space between them.
2. The rectangular bars can be drawn horizontally or vertically.
3. The height of the rectangular bar is equivalent to the data they
represent.
4. The rectangular bars must be on a common base.
Uses of Bar Graph
A bar graph is mostly used in mathematics and statistics. Some of the uses of
the bar graph are as follows:
1. All rectangular bars should have equal width and should have equal
space between them.
2. The rectangular bars can be drawn horizontally or vertically.
3. The height of the rectangular bar is equivalent to the data they
represent.
4. The rectangular bars must be on a common base.
Uses of Bar Graph
A bar graph is mostly used in mathematics and statistics. Some of the uses of
the bar graph are as follows: