geom_GeomContourFilled() not implemented in plotly
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Geom_contour_filled() is not supported by plotly.
Brief reproducable example below
library(ggplot2)
df <- tibble(x = c(0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5),
y = c(40, 40, 40, 40, 40, 40, 20, 20, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0, -20, -20, -20, -20, -20, -20, -40, -40, -40, -40, -40, -40, -60, -60, -60, -60, -60, -60),
z = c(52.25, 49.38, 48.31, 46.17, 44, 43, 45.75, 44.22, 43.19, 41.16, 40.2, 39.6, 40.13, 39.21, 38.26,
36.39, 36.2, 36, 35, 34.5, 33.65, 32.81, 32.6, 31.97, 31.25, 30.35, 30.3, 30, 28.5, 27, 26.62, 26.2, 25.99, 24, 21.5, 17.23))
# This works well
p <- ggplot(df, aes(x = x, y = y)) +
geom_contour_filled(aes(z = z, fill = stat(level_mid))) +
scale_fill_viridis_b()
# However it doesn't work with ggplotly:
ggplotly(p)
Warning message:
In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomContourFilled() has yet to be implemented in plotly.
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 ggplot2 example and calling ggplotly(p) to observe the geom_GeomContourFilled() warning. Trace how ggplotly handles the contour layer; done means filled contours are supported without that warning and the example renders through plotly.
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