python中的剧情动画:播放按钮不必要重置视图角度

发布于 2025-01-22 17:29:23 字数 828 浏览 3 评论 0原文

FWIW:在Python 3.10,Plotly 5.5.0,简化1.8.1上工作; OS:Ubuntu(WSL2)。

我成功使用了 plotly.graph_objects.graph_objects 在Plotly API中,在按下“播放”按钮或手动使用滑块时,可以构建一个3D图(在图中使用帧)。 该图显示通过 st.plotly_chart

可以用鼠标从任何角度操纵和查看剧情,,每当动画播放时,视角总是以相同的角度重置,而我需要能够从我的任何角度播放动画d。

示例:

请注意我如何首次使用光标手动旋转剧情,然后按播放,以及图(由几个痕迹组成,每个刻面组成)在播放制造的帧之前自动重置其视角向上动画。我想避免这种行为,并能够从我用鼠标手动设置的角度播放帧。

FWIW: working on Python 3.10, Plotly 5.5.0, streamlit 1.8.1; OS: Ubuntu (WSL2).

I have successfully used the plotly.graph_objects Figure object in the plotly API to build a 3D plot that gets animated (using frames in the Figure) when pressing a 'Play' button or manually using the slider.
The plot is shown on a Streamlit app via st.plotly_chart

The plot can be manipulated and viewed from any angle with the mouse, however whenever the animation gets played, the view angle is always reset to the same angle, while I need to be able to play the animation from whatever angle I'd like.

Example:
enter image description here

Notice how I first manually turn around the plot with the cursor, then press play, and the figure (made up of several traces, one per facet) automatically resets its view angle before playing the frames that make up the animation. I want to avoid that behavior and be able to play the frames from the angle I manually set with the mouse.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文