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.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
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: