0

I am trying to code a histogram using plotly in R with dates on the x axis and values on the y axis. The data is stored in a matrix that is called alpha and has the time in update_time and the values in alpha

p <- plot_ly(clonerAlpha,
         x = ~update_time,
         y = ~alpha,
         name = 'Cloner Alpha',
         type = 'histogram',
         color = I('#054C70')) %>%
  layout(title = "Cloner Alpha", xaxis = ax, yaxis = list(title= "Alpha"),   hovermode = 'x', margin = list(b = 160))
khaled_bhar
  • 257
  • 1
  • 4
  • 21
savannahmm5
  • 11
  • 1
  • 4
  • I don't see any question. Are you having errors? What's your expected result? – Tung Sep 27 '18 at 13:04
  • 1
    Please share sample of your data using `dput()` (not `str` or `head` or picture/screenshot) so others can help. See more here https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example?rq=1 – Tung Sep 27 '18 at 13:04
  • Sorry, my expected result is update_time on the x axis and the alpha values on the y axis. – savannahmm5 Sep 27 '18 at 13:15
  • Please share what happens when you run the code above. If you add the results from `dput(clonerAlpha)` above the code and error messages below, we might be able to help. See link from Tung's comment above. – forestfanjoe Sep 27 '18 at 13:40

0 Answers0