Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- import numpy as np
- vector = [4, 3, 2, 1]
- myLabels = ["Apples", "Pears", "Bananas", "Cherries"]
- y = np.array(vector)
- plt.pie(y, labels = myLabels)
- plt.legend(title = "Number of each fruit")
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement