Skip to content

Commit

Permalink
tight_layout and gridspec compatbilty fix (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
gillenbrown committed Mar 6, 2024
1 parent a0e538c commit 671fe72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion betterplotlib/manage_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ def subplots(*args, **kwargs):
# that we can access
subplot_kwargs = kwargs.setdefault("subplot_kw", dict())
subplot_kwargs.setdefault("projection", "bpl")
kwargs.setdefault("tight_layout", True)
# apply tight_layout if not using gridspec - can't do both
if "gridspec_kw" not in kwargs:
kwargs.setdefault("tight_layout", True)

return plt.subplots(*args, **kwargs)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages = ["betterplotlib"]

[project]
name = "betterplotlib"
version = "1.12.7"
version = "1.12.8"
description = "Some wrappers for matplotlib to make plotting easier and nicer."
readme = "README.md"
license = {file = "LICENSE"}
Expand Down

0 comments on commit 671fe72

Please sign in to comment.