I’m trying to convert the counts for a histogram to use a log scale. I tried adding type: "log", to my axis, which does indeed print a log scale, but then all my data disappears.
I found I can convert the data to log scale directly by using
Plot .groupY({x: d => Math10.log(d.length)}, ...
But that relabels the axis to the log of the values (i.e. between 0 and 3.5 instead of between 10 and 10,000). I was hoping for the horizontal bars to relate the log10 of the values while the x-axis would label a log scale indicating their actual values.
This second solution works well. In my present case the minimum value is 15, so \log_{10} of the minimum is greater than 1; 0.5 works well as a threshold. In a more general case I could determine the minimum programmatically and set such a threshold dynamically.
Since the length of the bars is not meaningful in this case (as it requires picking an arbitrary baseline), you could also consider switching to a dot mark instead like so: