0% found this document useful (0 votes)
2 views

Lab2

Uploaded by

Thưởng Thành
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lab2

Uploaded by

Thưởng Thành
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

THỰC HÀNH BUỔI 2

(Data Analytics and Visualization)


Phần 1. Trực quan dữ liệu với Matplotlib, sinh viên thực hành và điều chỉnh biểu đồ, giải
thích ghi chú lại những gì đạt được.
Exercise 1.1
Simple Matplotlib.pyplot for creation of a Sine & Cos Waves
1. Generates a NumPy Range of Values between 0 and 10.5 in steps of 0.2 2.
Passes the values Sine & Cosine trignometric functions in NumPy 3. Plots
the waves (standard line chart using Plot() function)
4. Displays the Plot

Exercise 1.2
Simple Matplotlib.pyplot for creation of line chart
1. Generates a NumPy 1 Dimensional array of 15 elements Using NumPy
Cumulative Sum and Random Numbers
2. Plot the Chart
3. Display the Plot
For a second option, use
1. Same Array created as in Step-1
2. Set Marker / Marker Size / Marker Face Color
3. Set Line Color, Width, Line Style and Label
4. Display the plot

Exercise 1.3
Simple Matplotlib.pyplot for creation of multiple lines in a line chart
1. Generate a dataframe with 5 columns x, yy, ww, zz and aa
2. Create 4 line plots
3. Configure various line settings for each of the plot
4. Set Marker / Marker Size / Marker Face Color
5. Set Line Color, Width, Line Style and Label
6. Display the plot

Exercise 1.4
Group of line charts using different style types and using various parameters for line
chart

1. Generate a dataframe with 6 columns x, y1, y2...y5


2. Create subplots for various types of line charts
3. Generate line charts with various styletypes
4. Generate Line2D Filler Markers
5. Set Line Color, Width, Line Style and Label
6. Display the plot
Exercise 1.5
Simple Matplotlib.bar Barchart
1. Create data set for display
2. Set config parameters
3. Display the plot

Exercise 1.6
A multiple column bar chart display
1. Create an array with data for Revenue of Top Tech Firms
2. Configure various settings for each of the plot
3. Set Marker / Marker Size / Marker Face Color
4. Set Legend, title etc.
5. Display the plot

Exercise 1.7
A horizontal bar chart with various pattern and color filling
1. Create an random data set
2. Build an array for various patterns and colors to display
3. Build a chart with dynamic patterns and colors and other parameters 4.
Display the plot

Exercise 1.8
A Scatter chart example - Simple and Sized Scatter
1. Create an random data set
2. Display a simple scatter chart
3. Display a simple scatter chart with differing scatter sizes

xercise 1.9
A Linear Scatter plot
1. Create an random data set based on linear equation
2. Build a scatter chart
3. Display the plot
Exercise 1.10
A Simple Histogram
1. Create an random data set
2. Build the bins for the histogram
3. Build a chart with colors and other parameters
4. Display the plot

Exercise 1.11
A Simple Histogram with additional parameters
Such as bin type, color, edge color and type of histogram
1. Create an random data set
2. Build the bins for the histogram
3. Build a chart with colors and other parameters
4. Display the plot
Exercise 1.12
A Simple Histogram with a best fit line
A gaussian bell curve style histogram
1. Create an random data set
2. Build the bins for the histogram
3. Build a chart with colors and other parameters
4. Display the plot

Exercise 1.13
Exercise to show how same set of data appears differently
In a line chart, scatter chart and a density plot
Link data:
https://raw.githubusercontent.com/kalilurrahman/datasets/ma
in/drawpython.csv
Exercise 1.14
A 3D Surface Plot using a mathematical function
1. Use a grid mesh
2. Build a 3Dimensional figure formula
3. Build a Mesh Grid
4. Build a surface plot
5. Display the visualization

Exercise 1.15
Show different types of Box Plots
Exercise 1.16
A sample box plot with multiple sets of data

Exercise 1.17
Show different types of Pie Charts
Exercise 1.18
A Simple Area Chart & an Area Chart with a Wiggle

xercise 1.19
A Matrix Show using Matshow() plot
Exercise 1.20
A Simple Violin Plot

Exercise 1.21
A Simple Treemap Plot

You might also like