geom_GeomImage() has yet to be implemented in plotly
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、geom_image() と headshot_url aesthetic を使用した、報告されている ggplotly(DisguisedRTG_ScatterPlot) の変換を再現します。plotly.R がこの geom をサポートするために必要な範囲を判断し、その後、変換された散布図が geom_GeomImage() は未実装であると報告するのではなく、選手の画像をレンダリングすることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100