How to change axis features in plotly?

Viewed 7394

I have the following bar in plotly and I want to :

  1. get the x-axis title away from the axis label so they dont overlap
  2. make the Y-axis labels bigger
  3. bring the bar values to the top of bars

enter image description here

My code is :

library(plotly)
plot_ly(x = c('100-200','200-400', '400-600','600-800','800- 1000'),
y = c(12261,29637,17469,11233,17043),          
name = "dd",
type = "bar", 
 xaxis = list(title ="tr"),
yaxis = list(title = "cc") ,                                                
 text = c(12261,29637,17469,11233,17043),textposition = 'auto') %>%
layout(
xaxis = list(tickangle=15, title = " "),
 yaxis = list(title = " "))

Thanks for your comments :)

2 Answers
Related