I am making a few figures where each one has a different amount of subplots in it. I am trying to add a legend in the bottom right corner but am having some trouble. I tried adding a new subplot in the bottom right and adding a legend only to it but then had an empty subplot behind the legend. This is where I'm standing now but want the legend in the bottom right corner regardless of where the last subplot is.
fig = plt.figure()
matplotlib.rc('xtick', labelsize=8)
matplotlib.rc('ytick', labelsize=8)
for line in a[1:]:
ax = fig.add_subplot(subcol,subrow,counter)
ax.plot(x,line[3:7],marker='o', color='r', label = 'oral')
ax.plot(x,line[7:],marker='o', color='b',label = 'physa')
ax.set_title(line[1],fontsize = 10)
counter+=1
ax.legend(bbox_to_anchor=(2, 0),loc = 'lower right')
plt.subplots_adjust(left=0.07, right=0.93, wspace=0.25, hspace=0.35)
plt.suptitle('Kegg hedgehog',size=16)
plt.show()