From 1a94372feea4b96604c9f47101893d58aababf72 Mon Sep 17 00:00:00 2001 From: moshi Date: Sat, 26 Aug 2023 16:37:11 +0900 Subject: [PATCH] Replace `set_layout_engine` to `tight_layout` To suppress error in older version of matplotlib (#7) --- src/pymsaviz/msaviz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pymsaviz/msaviz.py b/src/pymsaviz/msaviz.py index d370fc2..d752710 100644 --- a/src/pymsaviz/msaviz.py +++ b/src/pymsaviz/msaviz.py @@ -417,7 +417,7 @@ def plotfig(self, dpi: int = 100) -> Figure: y_size_list = [ax_type2y_size[t] for t in plot_ax_types] figsize = (self._wrap_length * self._x_unit_size, sum(y_size_list)) fig: Figure = plt.figure(figsize=figsize, dpi=dpi) # type: ignore - fig.set_layout_engine("tight") + fig.tight_layout() gs = GridSpec(nrows=len(plot_ax_types), ncols=1, height_ratios=y_size_list) gs.update(left=0, right=1, bottom=0, top=1, hspace=0, wspace=0)