I am trying to make a plot with 7 subtitles. I am currently drawing two columns: one with four graphs and the other with three, that is, the following:
I built this graph as follows:
import numpy as plotting
import matplotlib
from pylab import *
x = np.random.rand(20)
y = np.random.rand(20)
fig = figure(figsize=(6.5,12))
subplots_adjust(wspace=0.2,hspace=0.2)
iplot = 420
for i in range(7):
iplot += 1
ax = fig.add_subplot(iplot)
ax.plot(x,y,'ko')
ax.set_xlabel("x")
ax.set_ylabel("y")
savefig("subplots_example.png",bbox_inches='tight')
However, for publication, I think this looks a little ugly - I would like to make the transition of the last subtitle to the center between the two columns. So, what is the best way to adjust the position of the last subtitle so that it is centered? That is, to have the first 6 subplots in the 3X2 grid and the last sub-collection centered between the two columns. If possible, I would like to maintain a loop forso that I can just use:
if i == 6:
# do something to reposition/centre this plot
Thank,
Alex
source