Here is my working example:
library(ggplot2)
library(directlabels) # ver 2014.6.13 via r-forge
DF <- expand.grid(z = seq(1, 3001, by=10), k = seq(from=0.5, to=5, by=0.25))
# Defines the function value for each z-k combination
DF$dT <- with(DF, -0.07 * z * (1/2.75 - 1/k))
p <- ggplot(DF, aes(x = z, y = k, z = dT)) + theme_bw() +
stat_contour(aes(colour=..level..), breaks=c(seq(from=-40, to=0, by=5), c(seq(from=5, to=150, by=10))))
angled.boxes <- list("far.from.others.borders","calc.boxes","enlarge.box","draw.rects")
direct.label(p, "angled.boxes")
Which looks like this:
I want to turn the labels' box border colour to "white" but I cannot see how to do that. In the NEWS for the package, is written this:
2.5 --- 6 April 2012
draw.rects with configurable color, default black.
And seeing as "angled.boxes" is a list comprising:
angled.boxes <- list("far.from.others.borders","calc.boxes","enlarge.box","draw.rects")
I suppose it's possible, but how?
directlabels
functions without success. – Insurgentinstall.packages("directlabels", repos="http://r-forge.r-project.org")
– Kensell