You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When producing a plot with both cumulative and non-cumulative animations on the same plot where I assign names to both traces, I get the error Error in which(idx)[[1]] : subscript out of bounds
when trying to print the plot. I've debugged the issue and I think I isolated the problem, although I am not sure on how to fix it.
I think traceNamesMissing is supposed to hold the names of the traces that are missing on the particular frame d, but present on other frames. However, when debugging, frameTraceNames is a list of unique trace names but sapply(d, "[[", "name")
produces a list of character vectors in my situation, and therefore traceNamesMissing gets assigned with the name of all the traces of the plot. For my particular situation, I've been able to resolve the issue by replacing line 484 with
When producing a plot with both cumulative and non-cumulative animations on the same plot where I assign names to both traces, I get the error
Error in which(idx)[[1]] : subscript out of bounds
when trying to print the plot. I've debugged the issue and I think I isolated the problem, although I am not sure on how to fix it.
I believe the problem is here: https://github.com/ropensci/plotly/blob/9bc585ac0d689ad22e30e086ece6073081a9c37b/R/plotly_build.R#L484
I think
traceNamesMissing
is supposed to hold the names of the traces that are missing on the particular framed
, but present on other frames. However, when debugging,frameTraceNames
is a list of unique trace names butsapply(d, "[[", "name")
produces a list of character vectors in my situation, and therefore
traceNamesMissing
gets assigned with the name of all the traces of the plot. For my particular situation, I've been able to resolve the issue by replacing line 484 withHowever, since I am not that familiar with the internal workings of the package I don't think this solution can work for all cases.
Here is my reprex.
The text was updated successfully, but these errors were encountered: