plotly / plotly/plotly.R

Translate plotmath expressions

未關閉
#571 3 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

enhancement
主要語言
R
星號
2.7k
分支
641
PR 合併指標
30 天內沒有已合併 PR

描述

I have 2 issues using function ggplotly in R:


Question 1 What are the ways to keep R plotmath expressions while converting ggplot2 plots to plotly format using function ggplotly?

Now the expressions are converted to [object Object] as in this example below:

library(ggplot2)
library(plotly)

qplot(mpg, wt, data = mtcars) +
    ggtitle(expression(bar(x) == sum(frac(x[i], n), i==1, n)))

enter image description here

ggplotly()

enter image description here


Question 2

How to get rid of double labels in the legend of plotly graph and make them look like in ggplot2 graph? I.e. how to get 6 in stead of (6,6):

qplot(mpg, wt, data = mtcars, colour = as.factor(cyl), fill = as.factor(cyl))

enter image description here

ggplotly()

enter image description here

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先使用 ggplot2 和 ggplotly 重現回報的兩個範例:plotmath 標題變成 [object Object],而且圖例顯示重複的值,例如 (6,6)。追蹤 ggplotly 如何轉換 plotmath 表達式和組合的 colour/fill 尺度,然後驗證表達式是否能正確呈現,以及圖例項目是否與 ggplot2 的結果一致。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
r
領域
data-visualization
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
30/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。