The above image is what I want. Note the red annotation Big event happend
with an arrow to the X-axis label 2017-12-08
.
My code so far:
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import numpy as np
import pandas as pd
if __name__ == '__main__':
df = pd.DataFrame({
'experiment': [1, 2, 3],
'control': [2, 3, 4],
'date': ['2017-12-08', '2017-12-09', '2017-12-10'],
})
df['date'] = pd.to_datetime(df['date'])
df.plot(x='date', y=['experiment', 'control'])
plt.show()
My result so far