I load in a dataframe with electrical load values for around 2,5 years recorded in a 15 min interval beginning at 2018-04-01 00:15 and ending at 2020-09-03 00:15. Now I want to compare the load for the different years visually.
I display the result in a subplot with the following code:
df_compare = ...imagine this is a large dataframe
years = ['2018', '2019', '2020']
plt.figure()
for i in range(len(years)):
ax = plt.subplot(len(years), 1, i+1)
year = years[i]
result = df_compare[str(year)]
plt.plot(result['Total_consumption'])
plt.title(str(year), y=0, loc='left')
plt.show()
The result I get:
As you can see the months Jan to Mar 2018 are cut off and resized because there are no values existing. The same for Sept to Dec 2020.
