Question
import matplotlib.pyplot as plt %matplotlib inline plt.style.use('ggplot') plt.rcParams[figure.figsize] = (12, 9) # (width, height) x = ['Brunie Darussalam', 'Indonesia', 'Cambodia', 'Timor-Leste', 'Malaysia', 'Philippines', 'Thailand', 'Vietnam']
import matplotlib.pyplot as plt
%matplotlib inline
plt.style.use('ggplot')
plt.rcParams["figure.figsize"] = (12, 9) # (width, height)
x = ['Brunie Darussalam', 'Indonesia', 'Cambodia', 'Timor-Leste', 'Malaysia', 'Philippines', 'Thailand', 'Vietnam']
y = [216253.156, 65200000, 1089000, 63875, 12982685, 4332222.32, 26853366, 9570300]
x_pos = [i for i,_ in enumerate(x)]
plt.bar(x_pos, y, color='blue')
plt.xlabel('countries')
plt.ylabel('Total Genrated Waste (10 Million Tons)')
plt.title('Total Generated Waste in Southeast Asian Countries - 2019')
plt.xticks(x_pos, x)
plt.show()
I want to change the unit of the Y-axis (10milions, 20 millions, 30....), What code should I insert to convert the unit?
le 7 Total Generated Waste in Southeast Asian Countries - 2019 6 Total Genrated Waste (10 Million tons) 1. Brunie Darussalam Indonesia Cambodia Philippines Thailand Timor-Leste Malaysia countries Vietnam
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started