ggplotly geom_line vertical orientation is not working
オープン
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
ggplot2's geom_line allows setting the y-axis as the independent variable, by plotting in the order of how x is arranged:
library(tidyverse)
library(plotly)
c2 = c(1,2,3,4)
c1 = c(3,2,1,4)
dataset = data.frame(x=c1,y=c2)
p = ggplot(dataset %>%
arrange(y), aes(x=x, y=y))+
geom_point()+
geom_line(orientation="y")+
labs(
y = "Depth", x = "Maximum concentration",
)+
scale_y_reverse()
p
which results in:

however, this does not carry over when the plot is converted to plotly:
g = ggplotly(p)
g

I noted that the plotly documentation does mention orientation as well.
https://plotly.com/ggplot2/line-charts/#vertical-plot-orientation
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供されている R の例を、ggplot2 の geom_line(orientation="y") と ggplotly(p) による変換を使って開始します。ggplot2 の結果と変換後のプロットを比較し、Plotly の垂直プロット方向に関するドキュメントを確認します。変換後のプロットが要求された垂直方向を維持すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100