Log scale with scientific formatting

Why do I get a tick label for every point in the x-axis:
var xaxis = svg.append(“g”)
.attr(“transform”, translate(0,${height - marginBottom}))

When I remove the tickFormat(d3.format(“s”)) part there are 10 marks but as exponentials rather than 10k 20k etc. I using v4 of d4.


Do you have a notebook or a complete, running piece of code somewhere by any chance?

Try removing the second argument you passed to axis.ticks.

Thanks guys, I’ve managed to get it working by approaching it another way. V7 provides scientific log labels by default and following the release notes for v5,6,7 I’ve updated the other code.