Is there a matplotlib or seaborn plot I could use with g.map_lower or g.map_upper to get the correlation coefficient displayed for each bivariate plot like shown below? plt.text was manually mapped to get the below example which is a tedious process.
You can pass any function to the
map_*
methods as long as it follows a few rules: 1) it should plot onto the "current" axes, 2) it should take two vectors as positional arguments, and 3) it should accept acolor
keyword argument (optionally using it, if you want to be compatible with thehue
option).So in your case you just need to define a little
corrfunc
function and then map it across the axes you want to have annotated: