5.3 Matplotlib
5.3 Matplotlib
3
Data description
• The numerical findings of a study should be presented clearly, concisely, and in such a manner
that an observer can quickly obtain a feel for the essential characteristics of the data.
• Over the years it has been found that tables and graphs are particularly useful ways of
presenting data, often revealing important features such as the range, the degree of
concentration, and the symmetry of the data.
• Now we will discuss some common graphical and tabular ways for presenting data.
10/27/202
Python programming
3
DESCRIBING DATA SETS
• Frequency Tables and Graphs_Line,Bar,Pie
• Grouped Data_Scatter Plots
• Histograms
• Divide the values into groupings, or class intervals, and then plot the
number of data values falling in each class interval
• The endpoints of a class interval are called the class boundaries
• We will adopt the leftend inclusion convention
Frequency histogram
• Markers
• line
• labels
• grid
• subplot
• scatterplot
• histogram
• bar chart
• pie charts
10/27/2023 Python programming
Python Matplotlib
* Star
. Point
p Pixel
x/X X
+/p Plus
s Square
d/D Diamond
p Pentagon
H/h Hexagon
_ Hline
10/27/2023 Python programming
Marker formatting: colour, line style, marker size(use ms)
Change colour using color example-plt.bar(x, y, color = "red") change widh example: plt.bar(x, y, width = 0.1)
10/27/2023 Python programming
Histogram : to show frequency distributions