Q. Consider the data given below :
Using the above data plot the following :
(a) A line chart depicting the price of the apps
(b) A bar chart depicting the downloads of apps
(c) Convert the Est downloads sequence that has each downloads value divided by 1000 , now create a bar that plots multiple bar for prices as well Est downloads .
(d) The chart should have proper title for charts , axes , legends e.t.c .
You can understand by Watching video :-
Answer =
(a)
import matplotlib.pyplot as p price = [75,120,190,245,550,55,175,75,140] apps = ["Angry bird ","teen titan ","Marwell comics " , "colorme", "Fun run","Crazy taxi","igram pro","Wapp pro ","Maths formulas"] p.plot (apps,price) p.show()
(b)
import matplotlib.pyplot as p down = [197000,209000,414000,196000,272000,311000,213000,455000,278000] apps = ["Angry bird ","teen titan ","Marwell comics " , "colorme", "Fun run","Crazy taxi","igram pro","Wapp pro ","Maths formulas"] p.bar(apps,down) p.show()
(c)
import matplotlib.pyplot as p import numpy as n b = n.arange(3,28,3) est_download = [] price = [75,120,190,245,550,55,175,75,140] down = [197000,209000,414000,196000,272000,311000,213000,455000,278000] apps = ["Angry bird ","teen titan ","Marwell comics " , "colorme", "Fun run","Crazy taxi","igram pro","Wapp pro ","Maths formulas"] for i in down : est_download .append( i / 1000 ) p.xlabel("------Apps----") p.ylabel("Price and est download ") p.xticks(b + 0.5 ,apps) p.bar ( b , est_download , label = "Est download") p.bar ( b + 1 , price,label = "price") p.legend( loc = "upper left") p.show()
(d)
import matplotlib.pyplot as p import numpy as n b = n.arange(3,28,3) est_download = [] price = [75,120,190,245,550,55,175,75,140] down = [197000,209000,414000,196000,272000,311000,213000,455000,278000] apps = ["Angry bird ","teen titan ","Marwell comics " , "colorme", "Fun run","Crazy taxi","igram pro","Wapp pro ","Maths formulas"] for i in down : est_download .append( i / 1000 ) p.title("Apps Details") p.xlabel("------Apps----") p.ylabel("Price and est download ") p.xticks(b + 0.5 ,apps) p.bar ( b , est_download , label = "est download") p.bar ( b + 1 , price,label = "price") p.legend( loc = "upper left") p.show()
Output :-
(a)
(b)
(c)
(d)
Great job mam 👏🏻
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )