0

I have this list:

 [<Figure size 360x360 with 1 Axes>,
 <Figure size 360x360 with 1 Axes>,
 <Figure size 360x360 with 1 Axes>,
 <Figure size 360x360 with 1 Axes>,
 <Figure size 360x360 with 1 Axes>]

And I whant to show evey item in a grid, like grid plot, but I cannot. Helpe me please.

Joselin Ceron
  • 474
  • 5
  • 3

1 Answers1

0

Let's say you have 20 pictures/dataset to heat map:

fig, axes = plt.subplots(4,5, figsize=(8,10))

for ax, corr in zip(axes.ravel(), list_of_corr):
    sns.heatmap(corr, cmap="Accent_r", 
                vmax=1,center=0, square=True, 
                linewidths=3,annot=True, cbar=False
                ax=ax);   # magic is here
    ax.set_title('Correlaciones con Movilidad\n'+titulo+' - ' + municipio, pad =10)  
Quang Hoang
  • 146,074
  • 10
  • 56
  • 74
  • Well I will try that, in the meantime I could solve my problem exporting every heatmap, and then importing every imagen and paste them in a subplot, it worked. Thanks a lot. I will let you know if you solutions works. Again thanks. – Joselin Ceron May 23 '20 at 05:13
  • Unfortunately it did not work. i will show you my code ` # Draw the heatmap with the mask and correct aspect ratio fig = plt.figure(figsize=(5,5)) r = sns.heatmap(corr1, cmap="Accent_r", vmax=1,center=0, square=True, linewidths=3,annot=True, cbar=False); r.set_title('Correlaciones con Movilidad\n'+titulo+' - ' + municipio, pad =10) figures.append(fig)`. the **figure** list save every heatmap and that is the list that I would like to show. – Joselin Ceron May 23 '20 at 05:18
  • Try the updated code with your `sns.heatmap` command. – Quang Hoang May 23 '20 at 05:23