KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
import matplotlib.pyplot as plt gridnumber = range(1,4) b1 = plt.bar(gridnumber, [0.2, 0.3, 0.1], width=0.4, label="Bar 1", align="center") b2 = plt.bar(gridnumber, [0.3, 0.2, 0.2], color="red", width=0.4, label="Bar 2", align="center") plt.ylim([0,0.5]) plt.xlim([0,4]) plt.xticks(gridnumber) plt.legend() plt.show() Currently b1 and b2 overlap each other. How do I plot them separately like so:
Tags (comma-separated)
Save Edits
Cancel