문제

I am attempting to use directlabels to apply labels to a lasso plot as shown here. I am able to put the labels on the page, but am unable to change the size. Passing additional arguments in a list allows me to change other elements, but not text size.

require(ggplot2)
require(directlabels)
dat_test <- data.frame(x=1:10, value=c(sin(1:10), cos(1:10), tan(1:10)), fun=rep(c('sin', 'cos', 'tan'), each=10))
p <- ggplot(dat_test, aes(x=x, y=value, group=fun, colour=fun)) + geom_line()

direct.label(p, 'last.qp') # adds labels
direct.label(p, list('last.qp', size=2)) # does not work, same as above
direct.label(p, list('last.qp', rot=30)) # correct rotates text

Is it possible to be able to change the text size of the direct label?

도움이 되었습니까?

해결책

Use:

direct.label(p, list('last.qp', cex=2)) 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top