Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cite a Data Source in Matplotlib

So I am creating two simples bar graphs in matplotlib and I need to cite where I got the data from. Is there a function that allows me to do this?

like image 457
atdy17 Avatar asked Oct 18 '25 17:10

atdy17


1 Answers

You can use .annotate() to cite your source at the foot of your plot. Example:

import matplotlib.pyplot as plt

plt.annotate('[your citation here]', (0,0), (-80,-20), fontsize=6, 
             xycoords='axes fraction', textcoords='offset points', va='top')
like image 170
mechanical_meat Avatar answered Oct 21 '25 06:10

mechanical_meat