Skip to content

Commit

Permalink
fix plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed Nov 18, 2024
1 parent 670ec10 commit 88e5d7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion alphastats/gui/utils/analysis_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 88e5d7e

Please sign in to comment.