Missing polygons in animation
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
Missing polygons in animation.
The two plant shoots (light green and grey) are expected to reside in one frame, and the two red bars in another frame, but in the animation returned by ggplotly, the light green shoot is missing. How to resolve this issue? Thanks in advance!
# Import the data frame.
[df_all.txt](https://github.com/ropensci/plotly/files/4855628/df_all.txt)
df.all <- read.table('df_all.txt', header=T, row.names=1, sep='\t')
# All frames.
df.all$frame <- as.factor(df.all$frame)
unique(df.all$frame)
# Frame 1.
df1 <- subset(df.all, frame=='HRE2_hypoxia_1')
ggplot(df1, aes(x=x, y=y, frame=frame, group=tissue,value=value))+geom_polygon(fill=df1$color, size=0.2,color='grey70')
# Frame 2.
df2 <- subset(df.all, frame=='HRE2_control_2')
ggplot(df2, aes(x=x, y=y, frame=frame, group=tissue,value=value))+geom_polygon(fill=df2$color, size=0.2,color='grey70')
# Animation where the light green plant shoot is missing.
g <- ggplot(df.all, aes(x=x, y=y, frame=frame, group=tissue,value=value))+geom_polygon(fill=df.all$color, size=0.2,color='grey70')
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 supplied R reproduction with df_all.txt and compare the individual ggplot frames with the ggplotly(g) animation. Investigate the ggplotly animation conversion and consider the issue resolved when both polygons in the first frame and both red bars in the second frame are rendered.
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
- 30/100