I found the chapter of multiple plot is confusing. Instructions do not explain the code in detail.
Could someone help to interpret the below code? especially the loop part, what does i*12 for? Thank you a lot!!!
Screen Link: https://app.dataquest.io/m/143/multiple-plots/9/adding-more-lines
My Code:
fig=plt.figure(figsize=(10,6))
colors = ['red', 'blue', 'green', 'orange', 'black']
for i in range(5):
start_index=i*12
end_index=(i+1)*12
subset=unrate[start_index:end_index]
plt.plot(subset['MONTH'],subset['VALUE'],c=colors[i])
plt.show()