# SPLOM like multi-plots ###### tags: `matplotlib` `python` `splom` ``` import matplotlib.pyplot as plt m, n = 6, 6 label_pad_x = 0.06 label_pad_y = 0.08 fig_left_pad = 0.06 fig_bottom_pad = 0.06 fig_top_pad = 1 - fig_bottom_pad fig_right_pad = 1 - fig_left_pad fig_pad = [fig_left_pad, fig_bottom_pad, fig_right_pad, fig_top_pad] # Create a 2x2 grid of subplots (4 plots total) fig, axs = plt.subplots(m, n) fig.tight_layout(rect=fig_pad) # Add a super title for the entire figure fig.suptitle('Super Title', fontsize=16) # Add super x and y labels fig.text(0.5, 0, 'Super X Label', ha='center', va='center', fontsize=12) fig.text(0, 0.5, 'Super Y Label', ha='center', va='center', rotation='vertical', fontsize=12) for i in range(m): bbox = axs[i, 0].get_position() fig.text((bbox.xmin - label_pad_x) , (bbox.ymin + bbox.ymax) * 0.5, f'Fig {i}', rotation=90, verticalalignment='center') for j in range(n): bbox = axs[n - 1, j].get_position() fig.text((bbox.xmin + bbox.xmax) * 0.5 , (bbox.ymin - label_pad_y), f'Fig {j}', horizontalalignment='center') plt.show() ``` ![](https://hackmd.io/_uploads/By1kCoYr3.png)