Skip to content

Commit 152c3db

Browse files
authored
Merge pull request #169 from shakedzy/167-when-using-the-associations-in-a-notebook-and-plot=false-the-plot-gets-closed-ie-removed-without-ever-being-shown
fix for #167 #168
2 parents fbf525d + 932ddda commit 152c3db

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
## 0.7.9
4+
* Fixing `nominal.associations(plot=False)` not working as expected on Jupyter-based notebooks (issues [#167](https://github.com/shakedzy/dython/issues/167) & [#168](https://github.com/shakedzy/dython/issues/168))
5+
36
## 0.7.8
47
* `nominal.associations` now attempts to set the figure-size automatically based on output (issue [#30](https://github.com/shakedzy/dython/issues/30), by **[@Swish78](https://github.com/Swish78)**)
58

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.7.8
1+
0.7.9

dython/_private.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ def plot_or_not(plot: bool) -> None:
2222
if plot:
2323
plt.show()
2424
elif not plot and IS_JUPYTER:
25-
plt.close()
25+
fig = plt.gcf()
26+
if fig:
27+
plt.close(fig)
2628

2729

2830
def convert(

0 commit comments

Comments
 (0)