Finish the code below so that it results in a plot below:
import matplotlib.pyplot as plt
payment_method = ['Debit', 'Credit', 'Cash', 'Other']
statistics = [48, 33, 9, 10]
colors = ['lightblue', 'yellowgreen', 'coral', 'gold']
# YOUR CODE HERE #
plt.xlabel('Number of transactions (%)')
plt.ylabel('Methods')
plt.title('Preferred payment methods in 2014')
plt.show()The answer should be in the following format:
plt.barh(...)Tip: To give each bar a different color, pass the list of colors to the color parameter.