Translate plotmath expressions
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
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)))
ggplotly()
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))
ggplotly()
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing both reported examples with ggplot2 and ggplotly: the plotmath title becomes [object Object], and the legend shows duplicated values such as (6,6). Trace how ggplotly converts plotmath expressions and combined colour/fill scales, then verify that expressions render correctly and legend entries match the ggplot2 result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100



