Skip to content

Commit

Permalink
Replace set_layout_engine to tight_layout
Browse files Browse the repository at this point in the history
To suppress error in older version of matplotlib (#7)
  • Loading branch information
moshi4 committed Aug 26, 2023
1 parent b8eb381 commit 1a94372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pymsaviz/msaviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 1a94372

Please sign in to comment.