- import matplotlib.pyplot as plt
- # Assuming you have a list of categories and their values
- categories = ['Category1', 'Category2', 'Category3']
- values = [20, 35, 30]
- plt.bar(categories, values)
- # Loop to add values on each bar
- for i in range(len(values)):
- plt.text(x = i, y = values[i]+0.5, s = values[i], ha = 'center')
- plt.show()
Re: Untitled
From Colossal Leech, 3 Months ago, written in Plain Text, viewed 63 times.
This paste is a reply to Untitled from Insensitive Agouti
- view diff
URL http://codebin.org/view/2d333002
Embed
Download Paste or View Raw
— Expand Paste to full width of browser