Italicizing strip.text with ggplotly
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I've been trying to get the labels on a faceted grid to be italicized on the y-axis and can't seem to make it to happen.
Here I'll use the "Free Y Axis" example of a faceted grid as written by Plotly:
https://plotly.com/ggplot2/facet_grid/
The only change I've made to this code is make the strip text for both axes larger and the y-axis text italicized in the ggplot theme().
library(reshape2)
library(ggplot2)
library(plotly)
p <- ggplot(tips, aes(x=total_bill)) + geom_histogram(binwidth=2,colour="white")
# With panels that have the same scaling, but different range (and therefore different physical sizes)
p <- p + facet_grid(sex ~ smoker, scales="free", space="free") +
theme(strip.text.x = element_text(size = 13),
strip.text.y = element_text(size = 13,face = "italic"))
p
fig <- ggplotly(p)
fig
The plot produced by ggplot (p) looks like this, with the y-axis facet labels in italics:

The plot produced by ggplotly (fig) looks like this:

Any clarification if I'm missing something would be appreciated. Thank you!
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供されている「Free Y Axis」の例から始め、ggplot オブジェクト p と ggplotly の結果 fig を比較し、facet strip テキストのスタイルがどのように変換されるかに注目してください。y 軸の facet ラベルに欠けているイタリック体のスタイルを再現してください。ggplotly が大きい strip テキストを維持しながらイタリック体の書体も保持すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 45/100