plotly / plotly/plotly.R

FR: geom_lollipop

Đang mở
#1,210 8 bình luận 0 reaction 1 người được giao Xem trên GitHub

@kcbioy đang làm issue này rồi.

Từ ngày 12/10/2021.

ggplotly good-for-first-time-contribution
Ngôn ngữ chính
R
Star
2.7k
Fork
641
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.