I am trying to visualize a track on a map using ggmap + geom_path. This works fine with my coordinate dataset. Now I just want to change the color of the path using another parameter's values, which vary from -0.4 to 1. I am using the following part of code:
ggmap(m)+geom_path(data=ricky_df, aes(x=temp$GPS_x[1:850], y=temp$GPS_y[1:850]),colour=abs(soc_long)*100,size=1.5,lineend="round")
And the corresponding output is the following:
So, my problem is that there are many colors and I want to have for example one color which would be changed from dark to light. Does anybody have an idea how can I get this smoothing gradient? Thanks