21bei042 Prac06
21bei042 Prac06
Name-Meena Rangrej
Roll no -21BEI042
EXPERIMENT – 06
1 . https://www.kaggle.com/code/leonlxy/matplotlib-tutorial-with-exercises-1
2. Plot a line graph that shows in the figure for the given data. The runs scored between
two-wicket fall in a one-day international match between India and England is generated
using randomly.
CODE:
#matplot
#.Plot a line graph
import numpy as np
from matplotlib import pyplot as plt
wicket=np.arange(0,10)
india=np.cumsum(np.random.random(10))
england=np.cumsum(np.random.random(10))
plt.bar(wicket,india,label='india',color='purple')
plt.bar(wicket,england,label='england',color='green')
plt.xlabel("wicket")
plt.ylabel("run")
plt.title("SCOREBOARD")
plt.legend()
plt.show()
GRAPH:
CODE:
#matplot
#.Plot a line graph
import numpy as np
from matplotlib import pyplot as plt
wicket=np.arange(0,10)
india=np.cumsum(np.random.random(10))
england=np.cumsum(np.random.random(10))
width1=0.25
GRAPH:
CONCLUSION:
In this practice , we have learnt about the matplotlib function . We have implemented the
code in python and also plotted the graph using the cumulative sum of both the teams i.e
India and England.