plotly - how to set numbers as x-axis in R -
i want make bar chart , try add these numbers x-axis, dislocates items 10 , '>10':
plot_ly(x = c(1, 2,3,4,5,6,7,8,9,10,'>10'), y = c(5, 11, 23,14,21,18,20,19,12,31,21), name = "dd", type = "bar", xaxis = list(title ="tr"), yaxis = list(title = "cc"))
i following graph:
specifying layout xaxis worked me:
plot_ly(x = c(1, 2,3,4,5,6,7,8,9,10,'>10'), y = c(5, 11, 23,14,21,18,20,19,12,31,21), name = "dd", type = "bar", xaxis = list(title ="tr"), yaxis = list(title = "cc")) %>% layout(title = "features", xaxis = list(type = "category", title = "tr"), yaxis = list(title = "cc"))
Comments
Post a Comment