mikeroswell / ratioScales

Development of ratio scales package for plotting
https://mikeroswell.github.io/ratioScales/
1 stars 1 forks source link

densify breaks in `divMultBreaks()` #1

Closed mikeroswell closed 2 years ago

mikeroswell commented 2 years ago

Like grDevices::axisTicks(), ratioScales::divMultBreaks() is stubborn about creating more dense tick marks. These might be useful sometimes.

# this returns 7 breaks. I'd like more breaks between 1e0 and 1e3. 
divMultBreaks()(exp(c(-2, 5)))
# this returns the same 7 breaks.
divMultBreaks(n = 12)(exp(c(-2, 5)))

# it's based on grDevices::axisTicks(), which also doesn't really care about `nint`
grDevices::axisTicks(usr = c(-2, 3), log = T, nint =3) == grDevices::axisTicks(usr = c(-2, 3), log = T, nint = 9)
mikeroswell commented 2 years ago

Closing this issue as JD code splitDecades solves the issue described here, going to file a new one though.