1

I'm not too sure if this is possible. But I was wondering whether there is a way to add additional information onto the legend of a graph using matplotlib in python.

For example something like this:

enter image description here

Any help would be greatly appreciated!

JohanC
  • 71,591
  • 8
  • 33
  • 66
m3hran
  • 131
  • 8
  • [Drawing average line in histogram](https://stackoverflow.com/questions/16180946/drawing-average-line-in-histogram-matplotlib) – JohanC Dec 25 '20 at 14:57
  • 1
    You can use `plt.text(x, y, f'mean:{np.mean(x_values):.2f}')` to put text on a certain x,y position. – JohanC Dec 25 '20 at 15:00

0 Answers0