Python Data Visualization Worksheet: Properties

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

PYTHON DATA VISUALIZATION WORKSHEET

Q1. Write the statements as desired:

from matplotlib import pyplot as plt


x = [5,8,10]
y = [12,16,6]
x2 = [6,9,11]
y2 = [6,15,7]
____________# statement 1 To plot a line with x and y coordinates ,with width of line 5 and color green
plt.plot(x2,y2,'c',label='line two',linewidth=5)
_________________#statement 2 to give title as EPIC INFO
plt.ylabel('Y axis')
plt.xlabel('X axis')
plt.legend()
_______________________# Statement 3 to make grid on and color black
plt.show()

Q2. Consider the following data of a CSV file Company Sales data and write codes to perform the
exercises given below

Exercise 1: Read Total profit of all months and show it using a line plot
Exercise 2: Get Total profit of all months and show line plot with the following Style
properties
Exercise 3: Read all product sales data and show it using a multiline plot
Exercise 4: Read sales data of bathing soap of all months and show it using a bar
chart.
Exercise 5: Read the total profit of each month and show it using the histogram to
see most common profit ranges

You might also like