I am very new to python and I am stuck at something. Below is the piece of code which plots two lists against each other :
plt.figure(figsize=(24, 16), dpi= 80)
for item in temperature:
plt.plot(timestamp,item)
plt.legend(final_cities, loc = 'best')
plt.xlabel('Date Time Stamp')
plt.ylabel('Temperature in Kelvin')
plt.show()
timestamp and temperature lists looks like:
temperature=[[301.68, 300.71, 299.44, 299.6, 299.95], [306.41, 305.51, 303.36, 301.83, 303.37, 307.39]]
timestamp=['2020-09-22 15:00:00', '2020-09-22 18:00:00', '2020-09-22 21:00:00', '2020-09-23 00:00:00', '2020-09-23 03:00:00']
My code is plotting 2 graphs on top of each other. I want to print each plot as a subplot. How do I do it? Note: Each subplot will belong to a different country whose details are stored in a different list.