import numpy as np
import matplotlib.pyplot as plt
N=5
ind = np.arange(N) # the x locations for the groups
width = 0.35 # the width of the bars
boys_marks = (27, 35, 40, 35, 29)
girls_marks = (25, 42, 34, 22, 30)
fig, ax = plt.subplots()
rects1 = ax.bar(ind, boys_marks, width, color='b')
rects2 = ax.bar(ind + width, girls_marks, width, color='g')
ax.set_ylabel('Marks')
ax.set_title('Gender wise marks')
ax.set_xticks(ind + width / 1)
ax.set_xticklabels(('English', 'Logical', 'Quant', 'Programming', 'Domain'))
ax.legend((rects1[0], rects2[0]), ('Boys', 'Girls'))
plt.show()