scene aspectmodes "cube" or "manual" do not work with Scatter3D
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 18.8k
- 派生
- 2.8k
- 平均合并
- 16 小时 26 分钟
- 30 天内合并 PR
- 21
描述
Example from the plotly docs, with aspect mode set to cube.
import plotly.graph_objects as go
import numpy as np
# Helix equation
t = np.linspace(0, 10, 50)
x, y, z = np.cos(t), np.sin(t), t
layout = go.Layout(scene=dict(aspectmode="cube"))
fig = go.Figure(
data=[go.Scatter3d(x=x, y=y, z=z,mode='markers')],
layout=layout)
fig.show()
On the x and y axis, one grid unit is length 0.5. On the z axis one grid unit is length 2.

These should be displayed with equal lengths if the aspect ratio is a cube. Same issue with 'go.Layout(scene=dict(aspectmode="manual", aspectratio=dict(x=1, y=1, z=1)))'
This help post indicates this should work or worked in the past cc @empet
https://community.plotly.com/t/creating-a-3d-scatterplot-with-equal-scale-along-all-axes/15108
Thank you.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先运行提供的 Python 示例,其中使用 go.Layout(scene=dict(aspectmode="cube")),并比较渲染出的 x、y 和 z 网格单位长度。使用 aspectmode="manual" 和 aspectratio=dict(x=1, y=1, z=1) 重复相同的检查。当两种设置都为 Scatter3d 场景显示相等的轴长度时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100