Q. The score of four teams in 5 IPL matches is available to you. Write a program to plot these in a bar chart.
Answer :-
import matplotlib.pyplot as plt import numpy as np X = np. arange( 10 , 60,10 ) a = [52, 34, 89, 52, 80] b = [ 64, 48, 56 , 32, 40] c = [ 78, 68, 25 , 50, 45 ] d = [ 94 , 76, 88 , 54, 56 ] e = [ 48, 56, 74, 32, 41 ] plt.bar(X - 2, a) plt.bar(X - 1 , b) plt.bar(X , c) plt.bar(X + 1, d) plt.bar(X + 2, e) plt.xlabel("Five Teams") plt. show()
Output :-
WhyX-2
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )