diff --git a/PyWGCNA/wgcna.py b/PyWGCNA/wgcna.py index b7fdc3e..e1d8100 100644 --- a/PyWGCNA/wgcna.py +++ b/PyWGCNA/wgcna.py @@ -3123,7 +3123,8 @@ def barplotModuleEigenGene(self, moduleName, metadata, combine=True, colorBar=No ax.remove() ax_legend = fig.add_subplot(gs[:, 1]) ax_legend.axis('off') - axs_legend = gridspec.GridSpecFromSubplotSpec(len(metadata), 1, subplot_spec=ax_legend, + axs_legend = gridspec.GridSpecFromSubplotSpec(len(metadata), 1, + subplot_spec=ax_legend.get_subplotspec(), height_ratios=height_ratios) ind = [i for i in range(cat.shape[0])]