Is there a keyword argument to tune the number of ticks?
How could this be done?
I usually use Plots
with the GR
backend.
Often the routine finds a good number for the ticks.
Sometimes, I’d like to tune it a bit, e.g. here:
I am not sure how to touch this.
It would be great if there would be a way to extend the implementation for ticks
and not just overwrite everything brute force as with:
ticks = collect(0:0.2:1)
ticklabels = [ @sprintf("%5.1f",x) for x in ticks ]
plot(xticks=(ticks,ticklabels))
Two things:
- It would be great if the number of ticks could take the length of the numbers into account. This implies knowledge of the font size and length of the axis as well as the number range to be ticked.
- A quick fix would be a semi manual argument like
plot(..., xticks = :fewer)
Things that might relate:
Number of digits in xticks for Plots.jl
time tick issus on x axis