I would like to create a little label of text for each subplot in my facet grid, the text is in a dataframe (two columns: one for the R value, one for the p value that I want to print in the label). I can't figure out how to loop through the dataframe or to index it so that each subplot gets the corresponding label, i.e. subplot 1 = values from row 1 of the dataframe. This is what I have so far, any help would be appreciated!
g = sns.lmplot(data=T, y='Score', x='Value', col="MPM", row="Test")
for ax in g.axes.flat:
ax.text(0.02, 0.02, f'R = {...}, p = {...}', horizontalalignment='left',
verticalalignment='bottom', size='medium', color='black', transform=ax.transAxes)