import matplotlib.pyplot as plt
plt.bar(['UA', 'UK', 'USA'], [10, 11, 12], color=['blue','red','#48A48A'])
plt.show()
import matplotlib.pyplot as plt
- loads lib:Matplotlib module to use plotting capabilities.bar
- will plot bar chart['UA', 'UK', 'USA']
- x-axis values[10, 11, 12]
- y-axis valuescolor=
- specify colors array for barsblue
- first bar named colorred
- second bar named color#48A48A
- third bar color (can be HEX code)
group: bar
import matplotlib.pyplot as plt
plt.bar(['UA', 'UK', 'USA'], [10, 11, 12], color=['blue','red','#AAA999'])
plt.show()