Plotly Subplot Function Issue
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Please briefly describe your problem and what output you expect. If you have a question, please don't use this form, but instead ask on the community forum http://community.plot.ly/c/api/r or stackoverflow http://stackoverflow.com.
Please include a minimal reprex. The goal of a reprex is to make it as easy as possible for me to recreate your problem so that I can fix it. If you've never heard of a reprex before, start by reading https://github.com/tidyverse/reprex#readme, and follow the advice further down the page. Do NOT include session info unless it's explicitly asked for, or you've used reprex::reprex(..., si = TRUE) to hide it away.
Delete these instructions once you have read them.
I am trying to plot two plotly images side by side using the tutorial laid out here. However, I keep getting this error:
Warning messages:
1: No source found
2: No config found
3: 'layout' objects don't have these attributes: 'NA'
Valid attributes include:
'font', 'title', 'uniformtext', 'autosize', 'width', 'height', 'margin', 'paper_bgcolor', 'plot_bgcolor', 'separators', 'hidesources', 'showlegend', 'colorway', 'datarevision', 'uirevision', 'editrevision', 'selectionrevision', 'template', 'modebar', 'meta', 'transition', '_deprecated', 'clickmode', 'dragmode', 'hovermode', 'hoverdistance', 'spikedistance', 'hoverlabel', 'selectdirection', 'grid', 'calendar', 'xaxis', 'yaxis', 'ternary', 'scene', 'geo', 'mapbox', 'polar', 'radialaxis', 'angularaxis', 'direction', 'orientation', 'editType', 'legend', 'annotations', 'shapes', 'images', 'updatemenus', 'sliders', 'colorscale', 'coloraxis', 'metasrc', 'barmode', 'bargap', 'mapType'
My plotly objects are defined in the same way as follows:
log10_plot <- plot_ly(data=log10numi_frame,x=log10numi_frame$`Log10 Cell Index`,y=log10numi_frame$`Log10 nUMI`, type="scatter", mode = "lines", name=paste0(sample," nUMI"), line=list(color="#000000")) %>% layout(autosize = F, width = 700, height = 350, xaxis = list(title = "Cells in decreasing order by genic UMI count"), yaxis= list(title = "Log10(Genic UMI count)"))
if(! is.na(kneedle_cumfrac_knee)){
log10_plot <- add_segments(log10_plot,x=kneedle_cumfrac_knee, xend =kneedle_cumfrac_knee, y=min(log10numi_frame$`Log10 nUMI`), yend=max(log10numi_frame$`Log10 nUMI`), name=paste0("Kneedle (Cumulative Fraction) Knee (",round(kneedle_cumfrac_knee,digits=1),")"), text = "Kneedle (Cumulative Fraction) Knee", line=list(color="#E69F00"))
}
if(! is.na(kneedle_log10_knee)){
log10_plot <- add_segments(log10_plot,x=kneedle_log10_knee, xend = kneedle_log10_knee,y=min(log10numi_frame$`Log10 nUMI`), yend=max(log10numi_frame$`Log10 nUMI`), name=paste0("Kneedle (Log10) Knee (",round(kneedle_log10_knee,digits=1),")"), text = "Kneedle (Log10) Knee", line=list(color="#56B4E9"))
}
if(! is.na(second_deriv_min_knee)){
log10_plot <- add_segments(log10_plot, x=second_deriv_min_knee, xend = second_deriv_min_knee, y=min(log10numi_frame$`Log10 nUMI`), yend=max(log10numi_frame$`Log10 nUMI`), name=paste0("Second Derivative Knee (", round(second_deriv_min_knee,digits=1),")"), text = "Second Derivative Knee", line=list(color="#009E73"))
}
#if(! is.na(DropletUtils_knee)){
# log10_plot <- add_segments(log10_plot,x=DropletUtils_knee, xend = DropletUtils_knee,y=min(log10numi_frame$`Log10 nUMI`), yend=max(log10numi_frame$`Log10 nUMI`), name=paste0("DropletUtils Knee (",round(DropletUtils_knee,digits=1), ")"), text = "DropletUtils Knee")
#}
if(! is.na(DropletUtils_inflection)){
log10_plot <- add_segments(log10_plot,x=DropletUtils_inflection, xend = DropletUtils_inflection,y=min(log10numi_frame$`Log10 nUMI`), yend=max(log10numi_frame$`Log10 nUMI`), name=paste0("DropletUtils (Inflection) Knee (",round(DropletUtils_inflection,digits=1),")"), text = "DropletUtils (Inflection) Knee", line=list(color="#F0E442"))
}
if(! is.na(emptydrops_num_cells)){
log10_plot <- add_segments(log10_plot,x=emptydrops_num_cells, xend = emptydrops_num_cells, y=min(log10numi_frame$`Log10 nUMI`), yend=max(log10numi_frame$`Log10 nUMI`), name=paste0("DropletUtils (EmptyDrops) Knee (",round(emptydrops_num_cells,digits=1),")"), text = "DropletUtils (EmptyDrops) Knee", line=list(color="#0072B2"))
}
Currently I am calling this when I get the error:
subplot(log10_plot, cum_frac_plot)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Issue 内の R コードと subplot(log10_plot, cum_frac_plot) の呼び出しから始め、add_segments の呼び出しを含め、subplot がこれらの plotly オブジェクトをどのように結合するかを調べます。記載された警告を再現し、結果が無効なレイアウト属性なしで両方のプロットを横並びにレンダリングすることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100