f64
commited on
Commit
·
acda87d
1
Parent(s):
fd0f6f0
- pages/6_Plotly.py +5 -5
pages/6_Plotly.py
CHANGED
|
@@ -6,7 +6,7 @@ st.markdown("<style> header[data-testid='stHeader'] { display:none }", unsafe_al
|
|
| 6 |
import plotly.figure_factory as ff
|
| 7 |
import plotly.graph_objs as go
|
| 8 |
|
| 9 |
-
n =
|
| 10 |
# Add histogram data
|
| 11 |
x1 = np.random.randn(n) # - 2
|
| 12 |
x2 = np.random.randn(n)
|
|
@@ -15,10 +15,10 @@ x4 = np.random.randn(n)
|
|
| 15 |
|
| 16 |
|
| 17 |
figure = {
|
| 18 |
-
"data": [go.Scatter3d(z=x1, y=x2, x=x3, mode='markers',
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
"layout": go.Layout(height=
|
| 22 |
}
|
| 23 |
|
| 24 |
st.plotly_chart(figure)
|
|
|
|
| 6 |
import plotly.figure_factory as ff
|
| 7 |
import plotly.graph_objs as go
|
| 8 |
|
| 9 |
+
n = 80 # 200
|
| 10 |
# Add histogram data
|
| 11 |
x1 = np.random.randn(n) # - 2
|
| 12 |
x2 = np.random.randn(n)
|
|
|
|
| 15 |
|
| 16 |
|
| 17 |
figure = {
|
| 18 |
+
"data": [go.Scatter3d(z=x1, y=x2, x=x3, mode='markers',
|
| 19 |
+
marker=dict(size=7, color=x4, colorscale='Viridis', opacity=0.5)
|
| 20 |
+
)],
|
| 21 |
+
"layout": go.Layout(height=100, margin=dict(l=0, r=0, b=0, t=0), uirevision='foo')
|
| 22 |
}
|
| 23 |
|
| 24 |
st.plotly_chart(figure)
|