Add support for ggrepel::geom_text_repel labels
Chưa có ai nhận issue này.
- 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 would like to produce a scatter plot in HTML format where labels are associated with each point.
This works well when I export the plot in PDF or PNG format:
But my HTML does not have the labels associated with each point. The warning message suggests that plotly does not support the label geometry from the ggrepel package:
Would someone be so kind so add support for this function, please?
data(iris)
library(ggplot2)
library(htmlwidgets)
library(plotly)
p <- ggplot2::ggplot(iris, ggplot2::aes(x = Sepal.Length, y = Petal.Length)) +
ggplot2::geom_point() +
ggrepel::geom_text_repel(ggplot2::aes(label = Species)) +
ggplot2::theme_classic()
ggplot2::ggsave('output/plot/point/example_repel_labels.pdf', p, height = 15, width = 15)
ggplot2::ggsave('output/plot/point/example_repel_labels.png', p, height = 15, width = 15)
pPlotly <- plotly::ggplotly(p)
htmlwidgets::saveWidget(pPlotly, 'output/plot/point/example_repel_labels.html')
Output:
Warning message:
In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomTextRepel() has yet to be implemented in plotly.
If you'd like to see this geom implemented,
Please open an issue with your example code at
https://github.com/ropensci/plotly/issues
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu tại entry point geom2trace.default được nêu trong cảnh báo và tái hiện ví dụ R được cung cấp với geom_text_repel. Hoàn thành khi plotly::ggplotly render các nhãn trong HTML đã lưu mà không báo rằng GeomTextRepel không được hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- r
- Lĩnh vực
- data-visualization
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100