Question
Can you show me an example of how to describe the process of this coding? (I have no idea how to approach) I need to
Can you show me an example of how to describe the process of this coding? (I have no idea how to approach)
I need to explain the whole process
import matplotlib.pyplot as plt import numpy as np
plt.style.use('ggplot') plt.rcParams["figure.figsize"] = (12, 9) # (width, height)
x = ['Brunie Darussalam', 'Indonesia', 'Cambodia', 'Timor-Leste', 'Malaysia', 'Philippines', 'Thailand', 'Vietnam', 'Singapore'] y = [2162531.156, 65200000, 1089000, 6387500, 12982685, 4332222.32, 26853366, 9570300, 1870000]
x_pos = [i for i,_ in enumerate(x)] x_axis = np.arange(len(x_pos))
y1 = [0.499088743030168, 0.240923281868178, 0.0660538759431783, 0.0493960725965669, 0.406346654626102, 0.0400699034093881, 0.385682463666874, 0.0992130526364415, 0.32786310400448837]
ax1 = plt.plot() plt.bar(x_axis - 0.1, y1, 0.2, color='blue', label='Generated Waste per Person(Tons)') plt.ylabel("Generated Waste per Person (Tons)") plt.legend(['Generated Waste per Person (Tons)']) plt.xlabel('Countries')
ax2 = plt.twinx() ax2.bar(x_axis + 0.1, y, 0.2, color='orange', label='Total Generated Waste (Tons)')
plt.title('Generated Waste per Person and Total Generated Waste in Southeast Asian Countries - 2019') plt.ylabel("Total Genrated Waste (Tons)") plt.ticklabel_format(style='plain') plt.xticks(x_pos, x) plt.legend(['Total Genrated Waste (Tons)'], loc=(0.725, 0.9))
plt.show()
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