Here is an explanation of the preceding code:
- images = [] initializes the images list with blank.
- images.append(corr_wine) appends the corr_wine correlation matrix to the list of images. We repeat this four times to create the list of four images to be plotted on the 2 x 2 grid.
- grid1 = ImageGrid(fig, 131, nrows_ncols=(2, 2), axes_pad=0.0, label_mode="1") defines the image grid as follows:
- fig specifies the figure on which the grid is to be plotted.
- 131 specifies that it is a 1 x 3 grid, and this one is the first grid.
- nrows_ncols=(2,2) specifies the grid format as 2 x 2.
- axes_pad=0.0 specifies that the space between the images is zero.
- label_mode="1" specifies that ticklabels and axis labels should be printed only for the ...