Mapping alpha to continuous variable in geom_tile()/geom_raster()
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I am trying to convert a heatmap I created with ggplot to a plotly object. Everything works fine, except no matter what I do, it won't translate the alpha values (I have tried both having it as aes- what I want- but also giving it a random value and it won't work. This is the ggplot code and output, which works fine:
I have tried both geom tile and geom raster and none of them seem to work.
plot <- datos%>%
ggplot(aes(Var2, Var1, fill = value, alpha = dum,
text = paste("<b>Edad:</b>", Var2, "<br>",
"<b>Año:</b>", Var1, "<br>",
"<b> Año de nacimiento: </b>", (Var1 - Var2), "<br>",
"<b>Renta relativa:</b>", format(value,
big.mark = ".",
scientific = FALSE,
digits = 2))))+
geom_raster()+
scale_alpha(range = c(0.6, 1))+
scale_x_continuous(breaks = seq(20, 75, by = 5), limits = c(20, 80))+
scale_y_continuous(breaks = seq(2008, 2016, by = 2 ), limits = c(2008, 2016))+
theme_minimal()
ggplot output (with a little more formatting:

ggplotly output (just doing ggplotly(plot)):

コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、ggplotly(plot) を使用して提供された例を再現し、geom_raster() と geom_tile()、およびマッピングされた alpha 値と固定された alpha 値を比較します。alpha aesthetic に対する ggplotly の変換経路を追跡し、元の ggplot の出力と照合して結果を検証します。変換後のインタラクティブなヒートマップで連続的な alpha 値が保持されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100