I have a dataframe that looks like
id a1 a2 a3 a4 a5 a6 value1 value2
1 .2 .3 .4 .2 .1 .2 1 0
2 .1 .2 .1 .3 .7 .3 1 1
3 .4 .1 .1 .1 .5 .4 0 0
4 .5 .3 .3 .4 .6 .1 0 1
5 .3 .1 .1 .3 .2 .3 0 1
6 .7 .2 .3 .3 .6 .1 0 0
7 .2 .6 .8 .1 .2 .4 1 1
8 .1 .4 .2 .1 .9 .3 0 1
9 .4 .2 .1 .3 .5 .2 1 0
cols = ['a1', 'a2', 'a3', 'a4', 'a5', 'a6']
titles = []
for x in cols:
g = sns.lmplot(x = x,
y = 'value1',
data = data,
scatter_kws={"color": "black"}, line_kws={"color": "blue"})
title = x + 'val1'
g.set(title = title)
titles.append(title)
plt.show()
g = sns.lmplot(x = x,
y = 'value2',
data = data,
scatter_kws={"color": "black"}, line_kws={"color": "blue"})
title = x + 'val2'
g.set(title = title)
titles.append(title)
plt.show()
This shows me each figure under each other. I want to create a figure that has all 8 plots in a 4 by 2 column but there is text on top of the columns and text to the right of each plot. Like so:
fig, ((ax1, ax2), (ax3, ax4), (ax5, ax6)) = plt.subplots(3, 2)
for ax in fig.get_axes():
ax.label_outer()
Ideally, I am looking for the plots with the title and side labvels. But just the figure with plots would be great. But I don't know how to incorporate this with the code I am using to generate the plots.

