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:

enter image description here

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")) 

plotly v2


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -