From 932ddda0012c7d4f9f7c7d50d9723e02e7aeb2f0 Mon Sep 17 00:00:00 2001 From: Shaked Zychlinski Date: Mon, 6 Jan 2025 12:25:58 +0200 Subject: [PATCH] fix for #167 #168 --- CHANGELOG.md | 3 +++ VERSION | 2 +- dython/_private.py | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc82d1d..4d63262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## 0.7.9 +* 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)) + ## 0.7.8 * `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)**) diff --git a/VERSION b/VERSION index f83dbb3..1451d48 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.7.8 \ No newline at end of file +0.7.9 \ No newline at end of file diff --git a/dython/_private.py b/dython/_private.py index 66b3136..bae7487 100644 --- a/dython/_private.py +++ b/dython/_private.py @@ -22,7 +22,9 @@ def plot_or_not(plot: bool) -> None: if plot: plt.show() elif not plot and IS_JUPYTER: - plt.close() + fig = plt.gcf() + if fig: + plt.close(fig) def convert(