Hello,
I tried for hours, but I could not succeed. My data frame is simply
df <- as.data.frame(matrix(c(“g”,“d”,“a”,“b”,“z”,5,4,3,2,1),5,2))
library(“plotly”)
p <- plot_ly(data = df,x = ~V1,y = ~V2,type = “scatter”,mode = “lines+markers”) %>%
layout(title = “my title”)
p
So, this give me
But I don’t want x axis to be sorted alphabetically, I just want to keep the order as it is and see a decreasing graph.
Kind regards,