Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Legend name not passed when using frame animation

Open
#2,344 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
r

Research direction

Reproduce the three plot_ly() examples from the issue with plotly R version 4.10.4, comparing legend names when frame values repeat versus when they differ. Trace the frame animation handling to identify where the second trace's name is lost; done means the named legend entry is preserved for distinct frames without breaking the working cases.

Written by the indexing model from the issue text.

Description

Hi,

Legend names are sometimes not passed when using frame option.

#This is working (without frame)
plot_ly()%>%add_markers(1:3,2:4)%>%add_markers(1:3,2:4,name="New name")

#This is not (with frame)
plot_ly()%>%add_markers(1:3,2:4,frame=c(1,1,2))%>%add_markers(1:3,2:4,frame=c(1,2,2),name="New name")

#This is working (with frame) ! 
#This works apparently because frame 1 is repeated twice (frame=c(1,1,2) is okay but frame=c(1,2,3) is not)
plot_ly()%>%add_markers(1:3,2:4,frame=c(1,1,2))%>%add_markers(1:3,2:4,frame=c(1,1,2),name="New name")

[Package plotly version 4.10.4]

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

Getting set up

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.

More from plotly/plotly.R

All issues in plotly/plotly.R

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.