plotly / plotly/plotly.R

FR: geom_lollipop

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

@kcbioy 已经在做这个了。

开始于 2021年10月12日。

ggplotly good-for-first-time-contribution
主要语言
R
星标
2.7k
派生
641
PR 合并指标
30 天内没有已合并 PR

描述

I want to suggest a feature and I would be willing to give it a shot myself and opening a PR, but I would like to know if there is interest first.


I would like to see geom_lollipop implemented in plotly.

It is an alternative to geom_bar that basically combines two layers: geom_point and geom_segment.
For ggplot, geom_lollipop is implemented in the ggalt package.


Here is a minimal example:

library(ggalt)
library(plotly)

mtcars <- data.frame(car=rownames(mtcars), mtcars)

base.plot <- ggplot(mtcars, aes(car, mpg))

bar.plot <- base.plot + geom_bar(stat="identity")
bar.plot + ggtitle("static bar plot")
ggplotly(bar.plot + ggtitle("reactive bar plot"))

lollipop.plot <- base.plot + geom_lollipop()
lollipop.plot + ggtitle("static lollipop plot")
#This does not work:
#ggplotly(lollipop.plot + ggtitle("reactive lollipop plot"))

lollipop.plot <- base.plot + geom_segment(aes(xend=car), yend=0) + geom_point()
lollipop.plot + ggtitle("static lollipop plot")
# Now it works:
ggplotly(lollipop.plot + ggtitle("reactive lollipop plot"))
# But hints could be improved (also show point hints on segment hover).

Please let me know if there is any interest and maybe some hints how/where to start.

贡献指南

打开贡献指南

从这里开始

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

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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