plotly / plotly/plotly.R

Implement geom_GeomDensity2dFill

Open
#2,273 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
2.7k
Forks
641
PR merge metrics
No merged PRs in 30d

Description

Contours of 2D density estimates would be very helpful in my Shiny application I'm developing which soon should be published.
We would like to use plotly.

Brief description of the problem:

Warning in geom2trace.default(dots[[1L]][[60L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
  geom_GeomDensity2dFilled() 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

Create plot with geom_density_2d_filled and this has not yet been implemented.

p <- ggplot(df, aes(Y_cm, X_cm)) + geom_density_2d_filled(contour_var="ndensity") 

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied R example using geom_density_2d_filled(contour_var="ndensity") and trace the warning from geom2trace.default. Compare the requested filled-density behavior with existing plotly.R geom conversions; done means the example no longer warns and renders filled 2D density contours.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.