plotting a histogram in julia with as many bins as values

How do I make Julia Plots with the Plotly backend give me a histogram with as many integer bins from to max value in the series while displaying all the x-axis tick marks for each bin?

using Plots
plotly()
age = 100*rand(1000,1)
histogram(age, bins=100)

You can specify the bins for a histogram with a AbstractVector for the bins argument. You can also specify the ticks the same with xticks.

using Plots
plotly()
age = 100*rand(1000)
histogram(age, bins=0:100, xticks=0:100)
1 Like