version 1.
This commit is contained in:
parent
3ad17718a9
commit
3c81689788
14
app.py
14
app.py
|
|
@ -23,18 +23,24 @@ radius = indices
|
||||||
x = radius * np.cos(theta)
|
x = radius * np.cos(theta)
|
||||||
y = radius * np.sin(theta)
|
y = radius * np.sin(theta)
|
||||||
|
|
||||||
df = pd.DataFrame({
|
df = pd.DataFrame(
|
||||||
|
{
|
||||||
"x": x,
|
"x": x,
|
||||||
"y": y,
|
"y": y,
|
||||||
"idx": indices,
|
"idx": indices,
|
||||||
"rand": np.random.randn(num_points),
|
"rand": np.random.randn(num_points),
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
||||||
st.altair_chart(alt.Chart(df, height=700, width=700)
|
st.text("Version 1")
|
||||||
|
|
||||||
|
st.altair_chart(
|
||||||
|
alt.Chart(df, height=700, width=700)
|
||||||
.mark_point(filled=True)
|
.mark_point(filled=True)
|
||||||
.encode(
|
.encode(
|
||||||
x=alt.X("x", axis=None),
|
x=alt.X("x", axis=None),
|
||||||
y=alt.Y("y", axis=None),
|
y=alt.Y("y", axis=None),
|
||||||
color=alt.Color("idx", legend=None, scale=alt.Scale()),
|
color=alt.Color("idx", legend=None, scale=alt.Scale()),
|
||||||
size=alt.Size("rand", legend=None, scale=alt.Scale(range=[1, 150])),
|
size=alt.Size("rand", legend=None, scale=alt.Scale(range=[1, 150])),
|
||||||
))
|
)
|
||||||
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue