Modified axis tick label in a `ggplot` object do not render in the `ggplotly` call
Open
Nobody has claimed this yet.
ggplotly
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
The axis tick labels generated byscales::math_format in aggplot object do not render in the ggplotly object. (Also, the annotation_logticks generates an warning that "geom_GeomLogticks() has yet to be implemented in plotly." Addressing that geom will be noted as a second issue, #1146)
library(ggplot2) # version 2.2.1
library(plotly) # version 4.7.1
g <-
ggplot(txhousing) +
aes(x = date, y = log10(volume)) +
geom_point() +
scale_y_continuous(labels = scales::math_format(10^.x)) +
annotation_logticks(side = "l")
g

ggplotly(g)

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 running the reproducible R example with plotly, ggplot2, and scales, then compare the ggplot and ggplotly axis labels. Trace how scales::math_format labels are transferred into the ggplotly object. Done means the modified tick labels render in ggplotly; annotation_logticks is separately tracked in issue #1146.
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
- Mostly clear
- Newbie friendliness
- 35/100