Skip to content

Commit 2d4120c

Browse files
committed
update streamlit plot with new syntax
1 parent b94918f commit 2d4120c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

solarmach/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ def plot(self, plot_spirals=True,
942942
# import streamlit.components.v1 as components
943943
# st.plotly_chart(pfig, theme="streamlit")
944944
# components.html(pfig.to_html(include_mathjax='cdn'), height=500)
945-
st.plotly_chart(fig, theme="streamlit", use_container_width=True)
945+
st.plotly_chart(fig, theme="streamlit", width='stretch')
946946
else:
947947
pfig.show()
948948

@@ -2351,7 +2351,7 @@ def add_ring(fig, radius, line=dict(color="black", dash="dot")):
23512351
# components.html(fig.to_html(include_mathjax='cdn'), height=700)
23522352
st.plotly_chart(fig.update_layout(width=700, height=700),
23532353
theme=None, # "streamlit",
2354-
use_container_width=True,
2354+
width='stretch',
23552355
config=config)
23562356
else:
23572357
fig.show(config=config)
@@ -2715,7 +2715,7 @@ def add_ring(fig, radius, line=dict(color="black", dash="dot")):
27152715
# components.html(fig.to_html(include_mathjax='cdn'), height=700)
27162716
st.plotly_chart(fig.update_layout(width=700, height=700),
27172717
theme=None, # "streamlit",
2718-
use_container_width=True,
2718+
width='stretch',
27192719
config=config)
27202720
else:
27212721
fig.show(config=config)

0 commit comments

Comments
 (0)