add_ribbons can't handle NA values
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
The plotly function add_ribbons() doesn't function properly when cases in the middle or at the end have NA values. These lead to a weird behaviour where parts of the ribbons are missing or drawn in wrong places (see Plots 1 & 3). When the connectgaps-Attribute is set to TRUE for the ribbon the bug doesn't appear (see Plot 2).
NA values in the beginning don't seem to be a problem as well (see Plot 3, Red Trace 2).
The same behaviour has also been reported with ggplot and plotly in issue #1060. But because it may either be two separate problems or just a problem in plotly itself also affecting the ggplot visualization I decided to open this separate issue.
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 with the R plotly add_ribbons() function and reproduce the behavior using the linked Plots 1–3, focusing on NA values in the middle and at the end. Compare the result with connectgaps set to TRUE and with the related ggplot and plotly issue #1060; done means ribbons render in the correct places without requiring connectgaps.
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
- 42/100