add shared axis for Scattergeo and other map plots
未关闭
还没有人认领这个 Issue。
feature
P3
- 主要语言
- JavaScript
- 星标
- 18.3k
- 派生
- 2k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 28
描述
I am trying to create two scattergeo-maps with synchronized axis. It seems like this feature is not implemented, but it would be very helpful. Are there any known workarounds?
Please find a minimal code example below.
from plotly.subplots import make_subplots
import plotly.graph_objects as go
# Geoscatter problem: axis are not synchronized
f_sub = make_subplots(1,2, shared_xaxes="all", shared_yaxes="all", specs=[[{"type": "scattergeo"}, {"type": "scattergeo"}]])
fig1 = go.Figure(go.Scattergeo())
fig2 = go.Figure(go.Scattergeo())
f_sub.add_traces(fig1.data, rows=1, cols=1)
f_sub.add_traces(fig2.data, rows=1, cols=2)
f_sub.show()
# Example for scatter (synchronised axis works)
f_sub = make_subplots(1,2, shared_xaxes="all", shared_yaxes="all")
fig1 = go.Figure(go.Scatter())
fig2 = go.Figure(go.Scatter())
f_sub.add_traces(fig1.data, rows=1, cols=1)
f_sub.add_traces(fig2.data, rows=1, cols=2)
f_sub.show()
Here is a gif of the example that shows how Scatter has a shared x axis, but not Scattergeo (zoom of the map on the left side does not get update):
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先复现包含两个 scattergeo 图的最小 make_subplots 示例,并将其与正常工作的 Scatter 示例进行比较。跟踪 scattergeo 如何处理 shared_xaxes 和 shared_yaxes;完成的标准是缩放一个地图会更新另一个地图,同时不会导致 Scatter 的同步坐标轴出现回归问题。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, python
- 领域
- data-visualization
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100