from matplotlib import pyplot as plt movies = ["Annie Hall", "Ben-hur", "Casablanca", "Gandhi", "West Side Story"] num_oscars = [5, 11, 3, 8, 10] # Bars are by default 0.8 width. We are adding 0.1 to the left coordinates so that all bars are centered xs = [i + 0.1 for i, _ in enumerate(movies)] # Plot the bars with left-x coordinates and heights (num_oscars) plt.bar(xs, num_oscars) plt.ylabel("# of Oscars") plt.title("Movies") # label x-axis with movie names at bar centers plt.xticks([i + 0.1 for i, _ in enumerate(movies)], movies) plt.show()