plotly / plotly/plotly.R

Map zoom not scaling evenly with facet wrap #2831

未关闭
#1,861 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
R
星标
2.7k
派生
641
PR 合并指标
30 天内没有已合并 PR

描述

Scaling of maps is not even when using facet_wrap.

plotly_map

Reproducible with the code below:

library(maps)
library(ggplot2)
library(plotly)

map <- map_data("world")
d <- as.data.frame(seq(1,25))
d$value <- sample(c(1:10), 25, replace=T)
d$lat <- sample(c(1:90), 25, replace=T)
d$lon <- sample(c(1:180), 25, replace=T)
d$season <- sample (c('Spring', 'Summer','Fall', 'Winter'), size=25, replace=T)

p <- ggplot() +
  geom_polygon(data=map, aes(x=long, y=lat, group=group), colour="grey", fill="light grey") +
  geom_point(data=d, aes(x=lon, y=lat,  size=value), alpha=I(0.7)) +
  facet_wrap( ~ season, ncol=2)

fig <- ggplotly(p)
fig

Thanks!

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先运行使用 maps、ggplot2 和 plotly 的可复现 R 示例,重点关注 facet_wrap 地图输出。跟踪分面地图比例尺的生成方式,并通过确认所有分面面板均匀缩放来验证更改。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, r
领域
data-visualization
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。