Skip to content

Commit 32513b6

Browse files
Merge remote-tracking branch 'origin/main'
2 parents 92e5b35 + 590795b commit 32513b6

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

cs_util/plots.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
99
"""
1010

11+
import matplotlib
1112
import matplotlib.pylab as plt
1213
import numpy as np
1314

@@ -52,6 +53,13 @@ def savefig(fname, close_fig=True):
5253
plt.close()
5354

5455

56+
def show():
57+
backend = matplotlib.get_backend()
58+
if 'inline' in backend.lower() or 'nbagg' in backend.lower():
59+
plt.show() # Works in notebooks
60+
plt.close()
61+
62+
5563
def dx(idx, nx=3, fx=1.025, log=True):
5664
"""Dx.
5765

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ readme = "README.md"
88
[tool.poetry.dependencies]
99
python = ">=3.9,<3.13"
1010
astropy = "^5.0"
11-
camb = "1.5.4"
1211
datetime = "^5.5"
1312
numpy = "^1.26.4"
1413
matplotlib = "^3.8.4"
@@ -17,6 +16,7 @@ scipy = "^1.13.0"
1716
vos = "^3.6.1"
1817
keyring = "^25.2.0"
1918
pyccl = "^3.0.2"
19+
camb = "^1.5.9"
2020

2121
[tool.poetry.dev-dependencies]
2222
pytest = "^6.2.5"

0 commit comments

Comments
 (0)