John
unread,Aug 24, 2010, 3:20:48 PM8/24/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggplot2
Hello,
I am trying to make a simple barplot and apply scale_colour_brewer.
The brewer colors get applied to the line color just fine, but do not
get applied to the fill colors. Any ideas? Thanks!
John
df = data.frame(Group=c('Group1', 'Group2'), Response=c(75, 50))
p = ggplot(df, aes(x=Group, y=Response, fill=Group, colour=Group))
p + geom_bar() + scale_colour_brewer()
> sessionInfo()
R version 2.11.1 (2010-05-31)
x86_64-apple-darwin9.8.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] grid datasets utils stats graphics grDevices
methods
[8] base
other attached packages:
[1] RColorBrewer_1.0-2 ggplot2_0.8.8 nlme_3.1-96
reshape_0.8.3
[5] plyr_1.1 proto_0.3-8 MASS_7.3-7
loaded via a namespace (and not attached):
[1] digest_0.4.2 lattice_0.18-8 tools_2.11.1