ggplotly() doesn't support multiple colors in axis ticks
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hello and thanks for the great job you did by making this really useful package. I just want to report an issue that appears when I need to colour the axis text of a plot with pre - defined colours. Below you can see the R code to build a really simple shiny app. If I plot my graph with the standard ggplot() function the names of the x axis result colored, but if I use the function ggplotly() to make my plot interactive, the text of the x axis remains black (the functions recognizes the arguments "angle" and "hjust" but not "col").
Thanks in advance for the availability.
Nico
library(ggplot2)
library(plotly)
library(shiny)
### UI
ui <- fluidPage(
fluidRow(
column(width = 8,
plotlyOutput(outputId = "plot",
height = "600px"))))
### SERVER
server <- function(input, output) {
output$plot <- renderPlotly({
mpg_s <- mpg[c(1, 19, 38), ] # subset to pick just 3 rows
col <- c("red", "green", "blue")
p <- ggplot(data = mpg_s,
aes(x = manufacturer, y = hwy)) +
geom_point() +
theme(axis.text.x = element_text(size = 20,
angle = 90,
hjust = 1,
colour = col))
ggplotly(p)
})
}
### LUNCH APP
shinyApp(ui = ui, server = server)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
この issue には Shiny アプリでの再現可能な ggplotly(p) の例がありますが、リポジトリのファイルやテストは記載されていません。まず、ggplotly が ggplot2 の axis.text.x 設定をどのように変換するかを追跡し、次に ggplot の出力とインタラクティブな出力を比較します。インタラクティブな x 軸の目盛りラベルに定義済みの色が表示されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100