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

Assignment 3

The document provides examples and instructions for creating various data visualization plots using Python including line plots, scatter plots, bar charts, histograms, pie charts, subplots, and stack plots using sample sales data.

Uploaded by

tabintq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Assignment 3

The document provides examples and instructions for creating various data visualization plots using Python including line plots, scatter plots, bar charts, histograms, pie charts, subplots, and stack plots using sample sales data.

Uploaded by

tabintq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Introduction to Data Science

Exercise 1: Read Total profit of all months and show it using a line plot
Total profit data provided for each month. Generated line plot must include the following
properties: –
• X label name = Month Number

• Y label name = Total profit


The line plot graph should look like this.

Exercise 2: Get total profit of all months and show line plot with the following Style
properties
Generated line plot must include following Style properties: –
• Line Style dotted and Line-color should be red

• Show legend at the lower right location.


• X label name = Month Number

1
• Y label name = Sold units number
• Add a circle marker.
• Line marker color as read
• Line width should be 3
The line plot graph should look like this.

Exercise 3: Read all product sales data and show it using a multiline plot
Display the number of units sold per month for each product using multiline plots. (i.e., Separate
Plotline for each product ).
The graph should look like this.

2
Exercise 4: Read toothpaste sales data of each month and show it using a scatter plot
Also, add a grid in the plot. gridline style should “–“.
The scatter plot should look like this.

3
Exercise 5: Read face cream and facewash product sales data and show it using the bar
chart
The bar chart should display the number of units sold per month for each product. Add a separate
bar for each product in the same chart.
The bar chart should look like this.

4
Exercise 6: Read sales data of bathing soap of all months and show it using a bar chart.
Save this plot to your hard disk
The bar chart should look like this.

5
Exercise 7: Read the total profit of each month and show it using the histogram to see the
most common profit ranges
The histogram should look like this.

6
Exercise 8: Calculate total sale data for last year for each product and show it using a Pie
chart
Note: In Pie chart display Number of units sold per year for each product in percentage.
The Pie chart should look like this.

7
Exercise 9: Read Bathing soap facewash of all months and display it using the Subplot
The Subplot should look like this.

8
Exercise Question 10: Read all product sales data and show it using the stack plot
The Stack plot should look like this.

9
10

You might also like