Scatterplot over time with traces connecting each dot

Hello everyone,

I am trying to create a scatter plot with some custom specifications. I want the x and y axis to present log10 intensities. Each dot is supposed represent one sample. Each frame is supposed to present a measure point.

I want to see how the dots move in the 2D space over different measure points. Also, I want lines to be drawn when the dots move, which allow to track the entire sequence of the dots moving around over all measure points.

This is how far I got:

library(tidyverse)
library(ggplot2)
library(plotly)

id <- c("drill_1", "drill_2", "drill_3", "drill_1", "drill_2", "drill_2", "drill_3", "drill_2", "drill_3", "drill_2", "drill_2", "drill_1", "drill_2", "drill_3", "drill_1", "drill_3")
signal_1 <- c(6663, 5914, 8471, 7474, 5509, 6206, 17174, 4876, 15243, 5256, 5405, 7094, 5166, 12709, 6838, 12597)
signal_2 <- c(3589, 3733, 5597, 4374, 4000, 4083, 7671, 3864, 6438, 3868, 3817, 4583, 3853, 5033, 4427, 5219)
measure.point <- c(0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 6, 6, 6, 8, 8)

df <- data.frame(ID = id,
                 signal_1 = signal_1,
                 signal_2 = signal_2,
                 measure.point = measure.point)

df %>%
  
  plot_ly(
    x = ~log10(signal_1),
    y = ~log10(signal_2),
    color = ~ID,
    frame = ~measure.point,
    text = ~ID,
    hoverinfo = "text",
    type = 'scatter',
    mode = 'markers+text'
  ) %>% 
  
  layout(
  xaxis = list(
    type = "log"
  )
  
)

Oddly, the dots change their color while they are moving. And for hours I do not get these β€œtraces” of each dot projected into the plot.

Maybe you have an idea to solve this problem.

Thanks a lot!