Implement geom_GeomFunction()
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 am running an R shiny app that uses plotly. One of the plots includes a distribution drawn using stat_function, which works great with ggplot(), but that dissapears when the ggplot object is passed to plotly::ggplotly(), returning the following message:
Warning message:
In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomFunction() 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
Please, follow the reproducible example below, using the attached file (see below) as input:
library("plotly")
library("tidyverse")
df <- readr::read_csv("effect.csv")
my_plot <- df %>% ggplot2::ggplot() +
stat_bin(aes(x=effect, y=..density..), fill="blue", colour="white", binwidth = 0.02) +
stat_function(aes(x = effect, y = ..y..), fun = get("dlnorm"), colour="red", n = 100, args = c(-3.3, 0.5)) +
scale_x_continuous(name = "Effect size") +
scale_y_continuous(name = "", limits = c(0, 25))
theme_minimal()
# ggplot (with the red line showing the distribution fit)
my_plot
# plotly version (without the line, and returning the above message)
plotly::ggplotly(my_plot)
Example file with effect.csv:
example.zip
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 với cảnh báo geom2trace.default do plotly::ggplotly() tạo ra và tái hiện cảnh báo đó bằng ví dụ R được cung cấp cùng tệp effect.csv. So sánh đầu ra của ggplot và plotly đối với stat_function với dlnorm. Được coi là hoàn thành khi đường phân phối xuất hiện trong đầu ra của plotly và cảnh báo về geom chưa được triển khai biến mất.
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
- 35/100