The following code assigns a manual color scale of red and black to my points:
require(ggplot2)
require(directlabels)
dtest <- data.frame(x=1:20,
y=rnorm(20,0,5),
v=seq(1,2))
p <- ggplot(dtest, aes(x=x,y=y,color=as.factor(v))) + geom_point() + scale_colour_manual(values=c("red","black"))
p #this looks good; red and black as intended
direct.label(p) #this falls back on the default colors
But when I apply direct.label() to the same plot, it overrides the color scale in favor of the ggplot default. Is there a way to prevent this? If not, what's the best way to assign new colors to the default ggplot scale? Thanks, Matt