Closed ldecicco-USGS closed 7 years ago
Also:
gs <- gsplot() %>%
points(1:100, 1:100, log="xy") %>%
axis(side=c(3,4), labels=FALSE, n.minor=4) %>%
axis(side=c(1,2), n.minor=4)
gs
side's 3 and 4 ticks aren't logged (and should be).
:point_up: @ldecicco-USGS I'm assuming this is example is something to do with #436 ?
They might be related, but that issue is specific to the date_axis.
Actually, that second example I posted has nothing to do with minor ticks. This:
gsplot() %>%
points(1:100, 1:100, log="xy") %>%
axis(side=c(3,4))
Shows a linear axis on 3 and 4 (and log on 1, 2). I would expect 3 and 4 to be logged if no other call to 3 & 4 are defined.
Yeah, that second example seems like a second issue.
Yup, making a new issue.
I'm seeing logged ticks now, but still seeing minor ticks on the inside instead of outside:
gsplot(frame.plot=FALSE) %>%
background_color(col="grey90") %>%
grid(col = "white", lty = 1) %>%
par(tcl=-0.2, cex=0.75, xaxs= "r", yaxs = "r") %>%
axis(side = c(1,2), lwd = 0, lwd.ticks = 1, n.minor=1)
gs <- gsplot() %>%
points(1:100, 1:100, log="xy") %>%
axis(side=c(3,4), n.minor=4) %>%
axis(side=c(1,2), n.minor=4)
gs
Wait, I did this earlier in this thread.... @ldecicco-USGS concluded that they were not the same. Sorry.
@ldecicco-USGS we have an arg called tcl.minor
. That fixes the issue, but @jiwalker-usgs is thinking we should have the default match the tcl
and tcl.minor
needs to be used if you want them to be different. Either way, we need more documentation about this.
gsplot() %>%
grid(col = "white", lty = 1) %>%
par(tcl=-0.2, cex=0.75, xaxs= "r", yaxs = "r") %>%
axis(side = c(1,2), lwd = 0, lwd.ticks = 1, n.minor=1, tcl.minor=-0.2)
Default tcl.minor = par('tcl')*0.5
so that it gets the correct direction. Add documentation about tcl.minor.
Thought this would be relatively simple. issues I see here:
1) tcl
gets ignored in axis
already, which is 👎
points(gsplot(), 1, 0, tcl = -0.5) %>% axis(side=1)
#differs from
points(gsplot(), 1, 0) %>% axis(side=1, tcl = 0.5)
2) axis is a call for multiple sides, so getting a default from a side par would need to be side-specific
3) There is a hierarch of getting the default for tcl.minor
that goes like this (I may be missing one?):
tcl
on the axis call (but note this one is broken as is)tcl
if it existstcl
in the gsplot object if it existspar('tcl')
value if none of the others are present. closed with #460
Should have the minor tick marks going outside, shows up inside: