sharex и sharey в сюжете - нет ответа - PullRequest
0 голосов
/ 09 октября 2018

Я пытаюсь использовать sharex и sharey для набора вспомогательных сюжетов, но когда я устанавливаю их «True», ничего не происходит.Есть ли причина для этого, я просто не вижу?Thx

for loci in locis:
    for parameter in paramlist:

        cols = ['Leadtime: {}'.format(col) for col in leadtimes]
        rows = ['Fx_version: {}'.format(row) for row in fx_version]

        # Create figure
        fig, axes = plt.subplots(len(fx_version), len(leadtimes), sharex=True, sharey=True,figsize=(20,20))
        fig.subplots_adjust(left=0.075,right=0.975,top=0.875, bottom=0.025)
        #

        for index_version, version in enumerate(fx_version):
            for index_lead,lead in enumerate(leadtimes):


               veri.plot_ctable(starttime, endtime, lead, version, loci, parameter, axes, index_lead, index_version)

        # Title
        title = "Contingency table for %s at %s between %s and %s"  % (paramdict_longwords[parameter], loci, starttime, endtime)
        fig.suptitle(title)

        for ax, col in zip(axes[0], cols):
                ax.annotate(col, xy=(0.5, 1.2), xytext=(10, 5),
                xycoords='axes fraction', textcoords='offset points',
                size='medium', ha='center', va='baseline')

        for ax, row in zip(axes[:,0], rows):
            ax.set_ylabel(row, rotation=90, size='medium')

        # Save figure
        figure_save_name = "ContingencyTable_%s_%s_from_%s_to_%s.png" % (parameter, loci, starttime, endtime)
        plt.savefig(figure_save_name)


return    
...