ggplotly does not yet support stat_poly_eq from ggpmisc package
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
Brief description of the problem
stat_poly_eq from ggpmisc package not currently supported with ggplotly for displaying equations of plotted models to a set of scatter data points.
my.formula <- y ~ x
ggplotly(ggplot(data = plotting_data1_1, aes(x = Days_observed, y = diff, group = year_month , colour = year_month)) + geom_point() + geom_smooth(data = plotting_data1_1, aes(group = year_month, colour = year_month), method = lm, se = FALSE, formula = my.formula) + stat_poly_eq(data = plotting_data1_1, aes(label = paste(..eq.label.., ..rr.label.., sep = "~~~"), colour = year_month),formula = my.formula, parse = TRUE)+ ylab("Actual estimate - Subsample estimate") + theme(plot.title = element_text(hjust = 0.5)))
#> Don't know how to automatically pick scale for object of type difftime. Defaulting to continuous.
Warning message:
In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomTextNpc() has yet to be implemented in plotly.
If you'd like to see this geom implemented,
Please open an issue with your example code at
https://github.com/ropensci/plotly/issues
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 provided ggplotly example and inspect the geom2trace.default warning for the unimplemented GeomTextNpc geometry. Trace how ggplot layers are converted to Plotly traces, then verify that stat_poly_eq renders the model equation and R² label in the resulting plot.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100