Search code examples
pythonmatplotlibplot-annotations

How to add a footnote under the x-axis of a plot


I couldn't find the right function to add a footnote in my plot.

The footnote I want to have is something like an explanation of one item in the legend, but it is too long to put in the legend box. So, I'd like to add a ref number, e.g. [1], to the legend item, and add the footnote in the bottom of the plot, under the x-axis.

Which function should I use?


Solution

  • One way would be just use plt.text(x,y,'text')