In the attached plot, I want to display labels on the diagonal (red colored). I tried method like map_diag from PairGrid. Is there a method to display the labels?
import pandas as pd
import seaborn as sns
def hide_current_axis(*args, **kwds):
plt.gca().set_visible(False)
g = sns.PairGrid(df, diag_sharey=False)
g.map_lower(sns.regplot,lowess=True, scatter_kws={"color": "black"}, line_kws={"color": "red"})
g.map_upper(hide_current_axis)
for ax in g.axes.flatten():
# rotate x axis labels
ax.set_xlabel(ax.get_xlabel(), fontsize=30)
# rotate y axis labels
ax.set_ylabel(ax.get_ylabel(), fontsize=30)
# set y labels alignment
ax.yaxis.get_label().set_horizontalalignment('right')
map_diag "https://seaborn.pydata.org/generated/seaborn.PairGrid.map_diag.html"

Instead of creating a
PairGridand mappingsns.regplot, you could directly create asns.pairgrid(kind='reg', ...). The parameters for theregplotgo into theplot_kws=parameter.Instead of removing the upper half of the grid, the option
corner=Truecould be used. Setting the font size for the axes labels could be done viawith sns.plotting_context(rc={"axes.labelsize": 20}). The texts for the diagonal could be set via a custom function given tog.map_diag.