I want to plot my trajectories using
geom_path, by having the changes of speed (in each trajectory) in
colorRampPalette. I have seen such a plot, but I do not know how to make it.
Here is my current code, showing different road users in colours, which I would like to have it by speed:
ggplot(trajectory_data_of_video_00004)+ geom_path(aes(x = x_axis , y = y_axis , group = User_id, color = User_type))+ scale_colour_manual(values = c("#0066CC", "#404040", "#FF0000", "#00CC00"))+ labs(x = "X-Coordinates (m)", y = "Y-Coordinates (m)") + theme_classic()