I'm newbie in matplotlib and I'm trying to set a text to a point in a graph but I've got the error:
Traceback (most recent call last): File "main.py", line 239, in main() File "main.py", line 232, in main p.show_graphic_ortg_drtg() File "/home/josecarlos/Workspace/python/process/process.py", line 363, in show_graphic_ortg_drtg Axes.Axes.annotate(xy=(df[0:1]["ortg"], df[0:1]["drtg"]), s="Hola") TypeError: annotate() missing 1 required positional argument: 'self'
My code is:
import matplotlib.axes as Axes
Axes.Axes.annotate(xy=(df[0:1]["ortg"], df[0:1]["drtg"]), s="Message")
df is a DataFrame from Pandas previously generated.
What am I doing wrong? I'm following some tutorials and documentation and I don't find the mistake.
plt.annotate(xy=(df[0:1]["ortg"], df[0:1]["drtg"]), s="Message")?