|
|
import streamlit as st, pandas as pd, numpy as np |
|
|
import my_static_tools as mst |
|
|
st.html(mst.STYLE_CORRECTION) |
|
|
|
|
|
import plotly.figure_factory as ff |
|
|
import plotly.graph_objs as go |
|
|
|
|
|
st.sidebar.markdown("# ПРИМЕР : интерактивные графики на Plotly plotly.graph_objs 📊") |
|
|
|
|
|
n = 80 |
|
|
|
|
|
x1 = np.random.randn(n) |
|
|
x2 = np.random.randn(n) |
|
|
x3 = np.random.randn(n) |
|
|
x4 = np.random.randn(n) |
|
|
|
|
|
|
|
|
my_uirevision = "qwerty" |
|
|
|
|
|
figure = { |
|
|
"data": [go.Scatter3d(z=x1, y=x2, x=x3, mode='markers', |
|
|
marker=dict(color=x4, size=4, opacity=0.5) |
|
|
)], |
|
|
"layout": go.Layout(margin=dict(l=0, r=0, b=0, t=0), height=750, uirevision=my_uirevision) |
|
|
} |
|
|
|
|
|
st.plotly_chart(figure) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|