[R] ggplot2: positioning legend on top of plot
email at calidasoft.co.uk
Mon Nov 24 17:46:46 CET 2008
With ggplot2 v0.8, how do I position a legend on top of the plot. Things
p + opts(legend.position="top")
work ok. But
p + opts(legend.position=c(0.5,0.5))
Error in as.character(x) :
cannot coerce type 'closure' to vector of type 'character'
so obviously I should be giving a string instead but I can't figure out
what it should be.
More information about the R-help