f64 commited on
Commit ·
13d9703
1
Parent(s): d227c2e
- app.py +1 -1
- pages/6_Plotly.py +4 -2
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import streamlit as st, pandas as pd, numpy as np
|
| 2 |
|
| 3 |
-
st.set_page_config(page_title="Предсказание V", page_icon="🦋") # set_page_config() can only be called once per app page, and must be called as the first Streamlit command in your script.
|
| 4 |
st.sidebar.markdown("# Стартовая страница 💎")
|
| 5 |
# remove decoration and popup menu button at top
|
| 6 |
st.markdown("<style> header[data-testid='stHeader'] { display:none }", unsafe_allow_html=True)
|
|
|
|
| 1 |
import streamlit as st, pandas as pd, numpy as np
|
| 2 |
|
| 3 |
+
st.set_page_config(layout="wide", page_title="Предсказание V", page_icon="🦋") # set_page_config() can only be called once per app page, and must be called as the first Streamlit command in your script.
|
| 4 |
st.sidebar.markdown("# Стартовая страница 💎")
|
| 5 |
# remove decoration and popup menu button at top
|
| 6 |
st.markdown("<style> header[data-testid='stHeader'] { display:none }", unsafe_allow_html=True)
|
pages/6_Plotly.py
CHANGED
|
@@ -13,12 +13,14 @@ x2 = np.random.randn(n)
|
|
| 13 |
x3 = np.random.randn(n) # + 2
|
| 14 |
x4 = np.random.randn(n)
|
| 15 |
|
|
|
|
|
|
|
| 16 |
|
| 17 |
figure = {
|
| 18 |
"data": [go.Scatter3d(z=x1, y=x2, x=x3, mode='markers',
|
| 19 |
-
marker=dict(size=
|
| 20 |
)],
|
| 21 |
-
"layout": go.Layout(margin=dict(l=0, r=0, b=0, t=0), uirevision=
|
| 22 |
}
|
| 23 |
|
| 24 |
st.plotly_chart(figure)
|
|
|
|
| 13 |
x3 = np.random.randn(n) # + 2
|
| 14 |
x4 = np.random.randn(n)
|
| 15 |
|
| 16 |
+
# https://discuss.streamlit.io/t/update-3d-scatter-plot-without-resetting-view/20686
|
| 17 |
+
my_uirevision = "qwerty"
|
| 18 |
|
| 19 |
figure = {
|
| 20 |
"data": [go.Scatter3d(z=x1, y=x2, x=x3, mode='markers',
|
| 21 |
+
marker=dict(size=3, color=x4, colorscale='Viridis', opacity=0.5)
|
| 22 |
)],
|
| 23 |
+
"layout": go.Layout(margin=dict(l=0, r=0, b=0, t=0), uirevision=my_uirevision) # height=100
|
| 24 |
}
|
| 25 |
|
| 26 |
st.plotly_chart(figure)
|