Max*_*nis 2 python animation plotly plotly-python
如何删除播放和停止按钮并只保留滑块?
import plotly.express as px
import pandas as pd
df = pd.DataFrame(dict(x=[0, 1, 0, 1],
y=[0, 1, 1, 0],
z=[0, 0, 1, 1]))
px.line(df, "x", "y", animation_frame="z")
Run Code Online (Sandbox Code Playgroud)
fig = px.line(df, "x", "y", animation_frame="z")
fig["layout"].pop("updatemenus")
fig.show()
Run Code Online (Sandbox Code Playgroud)