From dc8831c46cdd3b7d340a1db1178d6f0f2231bab4 Mon Sep 17 00:00:00 2001 From: Jan Gieseler Date: Thu, 1 Aug 2024 11:37:33 +0300 Subject: [PATCH] remove plotly fig alternatives --- solarmach/__init__.py | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/solarmach/__init__.py b/solarmach/__init__.py index 320e4ae..9133563 100644 --- a/solarmach/__init__.py +++ b/solarmach/__init__.py @@ -1854,14 +1854,11 @@ def pfss_3d(self, active_area=(None, None, None, None), color_code='object', rss colorscale='gray', showscale=False, opacity=0.2)) if _isstreamlit(): - fig.update_layout(width=700, height=700) + # fig.update_layout(width=700, height=700) import streamlit as st - import streamlit.components.v1 as components - tab1, tab2 = st.tabs(["3d plot", "3d plot (mobile devices)"]) - with tab1: - st.plotly_chart(fig, theme="streamlit", use_container_width=True) - with tab2: - components.html(fig.to_html(include_mathjax='cdn'), height=700) + # import streamlit.components.v1 as components + # components.html(fig.to_html(include_mathjax='cdn'), height=700) + st.plotly_chart(fig, theme="streamlit", use_container_width=True) else: fig.show() @@ -2039,14 +2036,11 @@ def plot_3d(self, colorscale='gray', showscale=False, opacity=0.2)) if _isstreamlit(): - fig.update_layout(width=700, height=700) + # fig.update_layout(width=700, height=700) import streamlit as st - import streamlit.components.v1 as components - tab1, tab2 = st.tabs(["3d plot", "3d plot (mobile devices)"]) - with tab1: - st.plotly_chart(fig, theme="streamlit", use_container_width=True) - with tab2: - components.html(fig.to_html(include_mathjax='cdn'), height=700) + # import streamlit.components.v1 as components + # components.html(fig.to_html(include_mathjax='cdn'), height=700) + st.plotly_chart(fig, theme="streamlit", use_container_width=True) else: fig.show()