I can't get the fine tuning right with my legend. I get an extra legend element "10" which is the point size in my plot. Can someone help me get rid of this extra element? Additionally I would also like to reduce the size of the legend.
If you want to reproduce my figure you can download my data in csv format here <https://github.com/scoyoc/EcoSiteDelineation/blob/master/VegNMDS_scores.csv > . Here is my code... >veg.nmds.sc = read.csv("VegNMDS_scores.csv", header = T) >nmds.fig = ggplot(data = veg.nmds.sc, aes(x = NMDS1, y = NMDS2)) >nmds.fig + geom_point(aes(color = VegType, shape = VegType, size = 10)) + > scale_colour_manual(name = "Vegetation Type", > values = c("blue", "magenta", "gray50", "red", > "cyan3", > "green4", "gold")) + > scale_shape_manual(name = "Vegetation Type", values = c(15, 16, 17, 18, > 15, 16, 17)) + > theme_bw() + > theme(panel.background = element_blank(), panel.grid.major = > element_blank(), > panel.grid.minor = element_blank(), > legend.key = element_rect(color = "white") > ) I have been messing around with > theme(..., legend.key.size = unit(1, "cm")) but I keep getting the error "could not find function unit". I'm not sure why, isn't unit supposed to be part of the legend.key argument? ... and the resulting figure... <http://r.789695.n4.nabble.com/file/n4680764/VegNMDS.jpeg > Thanks for the help. MVS ===== Matthew Van Scoyoc Graduate Research Assistant, Ecology Wildland Resources Department <http://www.cnr.usu.edu/wild/> & Ecology Center <http://www.usu.edu/ecology/> Quinney College of Natural Resources <http://cnr.usu.edu/> Utah State University Logan, UT ===== Think SNOW! [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.