Y-axis scale in histogram

How can I scale the y axis ticks in a histogram?

Is there a way to access the counts in a histogram from dispatching the plot function with st=:hist?

In my case I have counts in between 1 000 and a few 10 000s.
I would like to divide the y ticks by a fixed factor and a factor of the order of magnitude of the maximum of the counts.
And print this factor a in the y guide as Counts (10^a)

Similar but different:
(y axis scale)[Yaxis scale]

Try this and add some labor:

p = plot(rand(1000), st=:hist)
p[1][1][:y] 
2 Likes

Thanks, that’s the starting point I was searching for.

In this case:

p = plot(rand(1000), st=:hist)
yn = p[1][1][:y]
counts = maximum.(yn[1:6:length(yn)])