In the help for scale_fill_identity, it is written ## Not run: colour <- c("red","green","blue","yellow") qplot(1:4, 1:4, fill=colour, geom="tile") qplot(1:4, 1:4, fill=colour, geom="tile") + scale_fill_identity() # To get a legend, you also need to supply the labels to # be used on the legend, and the grob to draw them: # grob_tile, grob_line, or grob_point qplot(1:4, 1:4, fill=colour, geom="tile") + scale_fill_identity(labels=letters[1:4], guide="tile", name="trt")
This code used to work with ggplot2. However, after updating to the newer version (version 0.6) and R 2.7.2, I get the following error message: Error in get("new", env = ScaleIdentity, inherits = TRUE)(ScaleIdentity, : unused argument(s) (guide = "tile") If I omit the guide="tile" argument, I still get a tile, but I did like the option for choosing the grob to use. How should I go about this? Thanks, Pedro -- View this message in context: http://www.nabble.com/ggplot2---deprecated-guide%3D-argument-in-tp19529294p19529294.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.