I want to add some annotations and arrows to my plots using plt.annotate() and I am not sure how to change the arrow parameters.
import pandas as pd
import matplotlib.pyplot as plt
df = pd.DataFrame({'weight': [10, 10, 20, 5, 10, 15]})
print(df)
Dummy Data:
weight
0 10
1 10
2 20
3 5
4 10
5 15
Plot Line:
ax = df.plot(figsize=(8, 6))
ax.annotate("Maximum", xy=(2, 20), xytext=(2, 10),
arrowprops=dict(arrowstyle="->"), color='red')
How do I change the arrow color and other parameters to also match the Text? In this case I changed the text color to red.
Thanks for the help!
