I have a data set df wich contains variables Name(factor), Count(integer) and Time(POSIXct).
I'm using the following code:
df %>% plot_ly(x=~Time,y = ~Count,group = ~Name,color=~Name,type='scatter',
mode='lines+markers')
What happen is that the lines don't appear at all (the markers appear perfecly tho). Changing mode to 'lines' makes the data invisible, but the information appear whenever I hover the pointer over data locations.
Also note that running without the groups produce the excpected result (with lines visible)
df %>% plot_ly(x=~Time,y = ~Count,type='scatter',
mode='lines+markers')
What is wrong? How to make the lines visible?
Have you tried to ungroup the dataset? It worked for me.
df %>%
ungroup() %>%
plot_ly(x=~Time,y = ~Count,type='scatter', mode='lines+markers')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With