From 88e5d7e454bd390cd703e6ca3b6869ca5c9856b5 Mon Sep 17 00:00:00 2001 From: mschwoerer <82171591+mschwoer@users.noreply.github.com> Date: Mon, 18 Nov 2024 17:02:14 +0100 Subject: [PATCH] fix plotting --- alphastats/gui/utils/analysis_helper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alphastats/gui/utils/analysis_helper.py b/alphastats/gui/utils/analysis_helper.py index 46c5bcb6..ee4bf3c1 100644 --- a/alphastats/gui/utils/analysis_helper.py +++ b/alphastats/gui/utils/analysis_helper.py @@ -87,7 +87,8 @@ def _display( def display_figure(plot: PlotlyObject) -> None: """Display plotly or seaborn figure.""" try: - st.plotly_chart() + # calling plot.update_layout is vital here as it enables the savefig function to work + st.plotly_chart(plot.update_layout(plot_bgcolor="white")) except Exception: st.pyplot(plot)