How can I get the ticks to be horizontally centered on each of the bars?
spec = data((data=rand('a':'g', 1000),),) * mapping(:data) * visual(Hist)
draw(spec, axis=(xticklabelalign=(:center, :top),),)
How can I get the ticks to be horizontally centered on each of the bars?
spec = data((data=rand('a':'g', 1000),),) * mapping(:data) * visual(Hist)
draw(spec, axis=(xticklabelalign=(:center, :top),),)
I think the easiest in AoG is to do this via analyses, in particular here you can use frequency. So something like
spec = data((data=rand('a':'g', 1000),),) * mapping(:data) * frequency()
should do the trick. Histogram is at a bit of a disadvantage for categorical data because the binning gets in the way, whereas frequency
counts occurrences for each unique value.