Displaying 1 result from an estimated 1 matches for "drawtick".
Did you mean:
drawticks
2005 Mar 30
1
Finding the "height of a line of text" for axis
...axis. I have found the relevant function in plot.c:
"GConvertYUnits(Rf_gpptr(dd)->tcl, LINES, NFC, dd);"
but can't find the corresponding R function.
Can anyone suggest how to find this out, or solve the problem in a
different way?
# Inward pointing ticks
par("tcl"=1)
drawticks <- function(at) {
# Start of the ticks
base<-par("usr")[1]
# Length of the ticks
l<-par("cxy")[2]*par("tcl")
for (i in at) {
lines(c(base,base+l),rep(i,2),col="red")
}
}
# Test plot
plot(c(1,2,3), axes=FALSE)
# Draw ticks in red
drawticks(a...