1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
fig, axs= plt.subplots(4,3,figsize=(5,5),sharex=False,sharey=False) fig.subplots_adjust(hspace=0.1,wspace=0.2) axs = axs.flatten()
import matplotlib.gridspec as gridspec fig = plt.figure(figsize=(6,2)) gs = gridspec.GridSpec(nrows=2, ncols=1, height_ratios=[1.4,2]) fig.subplots_adjust(hspace=0.,wspace=0.28) ax1 = fig.add_subplot(gs[0,:]) ax2 = fig.add_subplot(gs[1,:]) axs = [ax1,ax2]
fig = plt.figure(figsize=(8, 6)) ax1= fig.add_subplot(3,3,1) ax2= fig.add_subplot(3,3,2) ax3= fig.add_subplot(3,3,4) ax4= fig.add_subplot(3,3,5) ax5= fig.add_subplot(3,3,7) ax6= fig.add_subplot(3,3,8)
ax7= fig.add_subplot(2,3,3) ax8= fig.add_subplot(2,3,6)
fig = plt.figure() fig.set_figheight(6); fig.set_figwidth(6) ax1 = plt.subplot2grid((3, 6), (0, 0), colspan=2) ax2 = plt.subplot2grid((3, 6), (0, 2), colspan=2) ax3 = plt.subplot2grid((3, 6), (0, 4), colspan=2) ax4 = plt.subplot2grid((3, 6), (1, 0), colspan=2) ax5 = plt.subplot2grid((3, 6), (1, 2), colspan=2) ax6 = plt.subplot2grid((3, 6), (1, 4), colspan=2) ax7 = plt.subplot2grid((3, 6), (2, 0), colspan=3) ax8 = plt.subplot2grid((3, 6), (2, 3), colspan=3)
|