yes, exactly I have referred to that link before. But I find histogram using plotly is not easily customisable as what I have done below, or maybe I am wrong:
p <- hist(y, col = 'skyblue3',panel.first=grid(),xlim=c(0,5),
main=title,breaks=bins_ex,xlab='',ylab='',font.main=1,axes = FALSE)
axis(1,at = seq(0,5,1),labels = TRUE,pos = 0)
axis(2,pos = 0)
abline(v=input$dist_ex_min,col="red",lwd=2,lty=2)
abline(v=input$dist_ex_max,col="red",lwd=2,lty=2)
# x axis
mtext(text = "rpm",
side = 1,line = 1)
# y axis
mtext(text = "count",
side = 2, #side 2 = left
line = 0.5)
p