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 摘要。