Skip to content

Commit a72c173

Browse files
committed
prevent plotting warning
1 parent 82dac84 commit a72c173

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_plot.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ def test_gaussian(dynamic, periodic, ndim, bound):
7676
results = sampler.results
7777
# check plots
7878
dyplot.runplot(results)
79+
plt.close()
7980
dyplot.runplot(results, span=[(0., 10.), 0.001, 0.2, (5., 6.)])
81+
plt.close()
8082
dyplot.runplot(results, logplot=True)
8183
dyplot.runplot(results,
8284
fig=(plt.gcf(), plt.gcf().axes),
@@ -85,6 +87,7 @@ def test_gaussian(dynamic, periodic, ndim, bound):
8587
plt.close()
8688
dyplot.traceplot(results)
8789
dyplot.traceplot(results, smooth=[10] * ndim)
90+
plt.close()
8891
dyplot.traceplot(results, connect=True)
8992
dyplot.traceplot(results,
9093
fig=(plt.gcf(), plt.gcf().axes),
@@ -102,6 +105,7 @@ def test_gaussian(dynamic, periodic, ndim, bound):
102105
span[1] = .9
103106

104107
dyplot.cornerplot(results, show_titles=True, truths=truths)
108+
plt.close()
105109
dyplot.cornerplot(results,
106110
smooth=10,
107111
verbose=True,
@@ -128,6 +132,7 @@ def test_gaussian(dynamic, periodic, ndim, bound):
128132
prior_transform=g.prior_transform,
129133
show_live=True,
130134
span=span)
135+
plt.close()
131136
dyplot.boundplot(results, dims=(0, 1)[:min(ndim, 2)], it=1000)
132137
plt.close()
133138

0 commit comments

Comments
 (0)