geom_GeomImage() has yet to be implemented in plotly
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 attempting to convert a standard ggplot2 scatterplot to a plotly graph using the ggplotly() function, but the lone caveat of the original scatterplot is that it uses headshots of NFL players for its points, rather than standard dots or other shapes. When I attempt this conversion, I am told that geom_GeomImage() has yet to be implemented in plotly. If it is possible for the plotly package to account for the geom_image() function, that would be fantastic.
Feel free to contact me at jacole@alumni.upenn.edu with any further questions about what I'm asking here.
# Scatterplot using ggplot
# Data frame is called DisguisedPassing_2018to2021_Vs_2022
# headshot_url is a column in the data frame that includes a link to each player's headshot
DisguisedRTG_ScatterPlot <- ggplot(data = DisguisedPassing_2018to2021_Vs_2022) +
geom_image(aes(x = RTG_2018to2021_Disguise, y = RTG_2022_Disguise, image = headshot_url), size = 0.07,
asp = asp_ratio) +
scale_y_continuous(breaks = seq(60, 120, 15)) +
scale_x_continuous(breaks = seq(65, 105, 10)) +
labs(x = "Passer Rating from 2018-21", y = "Passer Rating in 2022",
title = "Passer Rating vs. Disguised Coverages in 2022 and 2018-21",
subtitle = "Among 27 QBs with 75+ Such Attempts in Each Time Span",
caption = "Data from PFF") +
theme_bw() +
theme(plot.title = element_text(size = 10, hjust = 0.5),
plot.subtitle = element_text(size = 8, hjust = 0.5))
# Here's converting the above scatterplot to plotly using ggplotly() function
ggplotly(DisguisedRTG_ScatterPlot)
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 bằng cách tái hiện quá trình chuyển đổi ggplotly(DisguisedRTG_ScatterPlot) đã được báo cáo với geom_image() và aesthetic headshot_url. Xác định phạm vi cần thiết để plotly.R hỗ trợ geom này, sau đó xác minh rằng biểu đồ phân tán đã chuyển đổi hiển thị hình ảnh cầu thủ thay vì báo cáo rằng geom_GeomImage() chưa được triển khai.
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- 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