0

Following this answer (https://stackoverflow.com/a/36049914/7462275), I use the following code to plot a grid of subplots using matplotlib.

fig = plt.figure(figsize=(5,5))
ax=[fig.add_subplot(4,3,i+1) for i in range(12)]

for a in ax:
    plt.axis('on')
    a.set_xticklabels([])
    a.set_yticklabels([])
    #ax1.set_aspect('equal')

plt.subplots_adjust(wspace=0, hspace=0)
plt.show()

The output is :

enter image description here

I would like to add external axes to the whole figure. For example,

enter image description here

How is it possible to do that ? Thanks for answer.

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
Stef1611
  • 1,978
  • 2
  • 11
  • 30

0 Answers0