title: Displaying Plotly histogram time in hh:mm:ss
body: <p>I have a vector of marathon finishing times I want to plot as a histogram with the x-axis/bins in hours and minutes <code>hh:mm:ss</code> format using the <code>plot_ly</code> function in R. </p>
  
  <pre><code>library(plotly)
  
  R&lt;-c("02:17:20", "02:17:26", "02:19:17", "02:19:18", "02:20:50", "02:21:20")
  
  plot_ly(x = as.difftime(R), type = "histogram")
  </code></pre>
  
  <p>The x-axis and the popup on the chart displays in decimal format i.e <code>2.325</code> instead of <code>2:19:30</code> I assume this is because I'm using the <code>difftime</code>class. Is it possible to change the formatting of the graph to show it in <code>hh:mm:ss</code> format?</p>
  
  <p><a href="https://i.stack.imgur.com/b9pef.jpg" rel="nofollow noreferrer">Plot_ly running times histogram</a></p>