Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm plotting a graph via plotly, and I'm trying to rename my axes.

This is my code, with date, variable and value being columns in my file:

plot_ly(data, x = ~date, y = ~variable, z = ~value)

and this is my graph:

Graph

I'm trying to rename value, variable, date. Can you help me achieve it?

Thanks

question from:https://stackoverflow.com/questions/66050609/rename-axes-in-plotly

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
338 views
Welcome To Ask or Share your Answers For Others

1 Answer

Consider reading the manual a bit more carfully before posting questions here. However, this should help you:

plot_ly(data, x = ~date, y = ~variable, z = ~value) %>% layout(
     scene = list(
         xaxis = list(title = "some X label"),
         yaxis = list(title = "some Y label"),
         zaxis = list(title = "some Z label")
     ))

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...