. Use histograms for numerical variables only.
height_of_children_in_cms = https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip([100,100.70,101.5,102.3,103,103.2,103.5,104.5,105,106.2,107,100.7,102.3,102.3])
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(height_of_children_in_cms)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("Histogram of the height of children")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip()
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(height_of_children_in_cms , color='g')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("Histogram of the height of children")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("Height of children(in cms)")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip()
Pie charts in matplotlib¶
. For categorical variables
fruits = ['Apples', 'Bananas', 'Strawberries','Oranges', 'Pears', 'Grapes']
count_of_fruits = [23, 17, 35, 29, 12, 41]
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(count_of_fruits , labels = fruits)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip()
x = https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(-10,9,20)
print(x)
[-10. -9. -8. -7. -6. -5. -4. -3. -2. -1. 0. 1. 2. 3.
4. 5. 6. 7. 8. 9.]
y = x**3
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(x,y)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip()
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(2,2,1) #m - no. of rows, n-no. of columns, p=position of the current graph
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(x,y,'b*-')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(2,2,2)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(x,y,'y--')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(2,2,3)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(x,y,'m:')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(2,2,4)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(x,y,'g--')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip()
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(wspace=0.5) #wspace is used to adjust the spacing between the columns
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(2,2,1) #m - no. of rows, n-no. of columns, p=position of the current graph
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(x,y,'b*-')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(2,2,2)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(x,y,'y--')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(2,2,3)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(x,y,'m:')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(2,2,4)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(x,y,'g--')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip()
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(figsize=(20,10))
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("Cubic Function Graphs", fontsize=20, fontweight=20, verticalalignment="bottom")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(2,2,1) #m - no. of rows, n-no. of columns, p=position of the current graph
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(x,y,'b*-')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("sub plot 1")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(2,2,2)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(x,y,'y--')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("sub plot 2")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(2,2,3)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(x,y,'m:')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("sub plot 3")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(2,2,4)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(x,y,'g--')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("sub plot 4")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip()
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip()
web_monday = [123, 645, 950, 1290, 1630, 1450,1034,1295,465,205,80]
web_tuesday = [95, 680, 889, 1145, 1670,1323,1119,1265,510,310,110]
web_wednesday = [105,630,700,1006,1520,1124,1239,1380,580,610,230]
time_hrs = [7,8,9,10,11,12,13,14,15,16,17]
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(figsize=(10,7))
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(time_hrs , web_monday, linewidth =2,linestyle="--", marker='*' , markersize = 8, label = "Website traffic on Monday" )
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(time_hrs , web_tuesday, linewidth =2,linestyle="-.", marker='^', markersize = 8, label = "Website traffic on Tuesday")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(time_hrs , web_wednesday, linewidth =2, linestyle=":", marker='+', markersize = 10, label = "Website traffic on Wednesday")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(6,18))
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(loc="upper right", bbox_to_anchor=(1.3,1) ) # to move the default position of the legend on the graph
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(True)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip()
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(figsize=(20,10))
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("Website traffic analysis", fontsize = 20, verticalalignment="bottom")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(1,3,1)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(time_hrs,web_monday,color='g',marker='o')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("Website traffic on Monday")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("Time in hours spent on the website")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("Number of customers on Monday")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(1,3,2)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(time_hrs,web_tuesday,color='m',marker='o')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("Website traffic on Tuesday")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("Time in hours spent on the website")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("Number of customers on Tuesday")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(1,3,3)
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip(time_hrs,web_wednesday,color='y',marker='o')
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("Website traffic on Wednesday")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("Time in hours spent on the website")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip("Number of customers on Wednesday")
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip()
https://raw.githubusercontent.com/Collins76/Matplotlib-Exercises/Data-Science-Project/Godwin/Exercises-Matplotlib-3.8.zip()