How to reverse axis values when using plotly?

前端 未结 4 801
一个人的身影
一个人的身影 2021-01-17 16:25

Here is the program I used:

library(plotly)

mydata = read.csv(\"data_to_plot.txt\")
df = as.data.frame(mydata)

p <- df %>%
  group_by(X) %>%
  plo         


        
4条回答
  •  感情败类
    2021-01-17 17:08

    You can rotate the plot by setting x=-x, and/or y=-y. You can then remove the minus sign in the plot by using tickvals = list(-x_ticks) and ticktext = list(x_ticks) in layout. Haven't found a way to remove the minus signal from the hovertext. But I guess I can't have it all =)

提交回复
热议问题