I found an example to add lines to a plot_ly plot by using the add_trace command. How can I add a list of lines to plot without using add_trace>
plot_ly
add_trace
add_trace>
You need to set evaluate = TRUE to force evalutation / avoid lazy evaluation
evaluate = TRUE
p <- plot_ly() p for(line in my_lines) { p <- add_trace(p, y=line[['y']], x=line[['x']], marker=list(color=line[['color']]), evaluate = TRUE) } p