using ggforce paginated figures with ggplotly
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hello, I'm currently trying to use ggforce::facet_wrap_paginate to take figures with many facets and chop them up to make them easier for folks to view in a Shiny App. I can render these with ggplot just fine, but when I try to use poorly it just puts all of the facets on the same figure. The code below reproduces the problem, and the output I see shown as well. The figure on the top is paginated ggplot output and the one below is the paginated plotly output.
Any help would be most appreciated.
library(plotly)
library(ggplot2)
library(ggforce)
ui <- fluidPage(
plotOutput("page2_ggplot"),
tags$br(),
plotly::plotlyOutput("page2_ggplotly")
)
server <- function(input, output) {
tmpds = diamonds[1:1000,]
output$page2_ggplot = renderPlot({
p = ggplot(tmpds) +
geom_point(aes(carat, price), alpha = 0.1) +
facet_wrap_paginate(~ cut:clarity, ncol = 3, nrow = 3, page = 2)
res = p
res})
output$page2_ggplotly = plotly::renderPlotly({
p = ggplot(tmpds) +
geom_point(aes(carat, price), alpha = 0.1) +
facet_wrap_paginate(~ cut:clarity, ncol = 3, nrow = 3, page = 2)
res = plotly::ggplotly(p)
res})
}
# Run the application
shinyApp(ui = ui, server = server)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供されている Shiny アプリを実行し、facet_wrap_paginate(page = 2) を使用して renderPlot の出力を renderPlotly および ggplotly と比較します。ページ分割された facet の設定が Plotly への変換でどのように処理されるかを追跡し、Plotly の出力に要求した facet のページだけが表示されれば issue 完了とします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100