Skip to content

Commit

Permalink
remove plotly fig alternatives
Browse files Browse the repository at this point in the history
  • Loading branch information
jgieseler committed Aug 1, 2024
1 parent abf0ec9 commit dc8831c
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions solarmach/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit dc8831c

Please sign in to comment.