Team - Could you please do the needful. I have a below code using ggplot2() package. I am trying to plot between the variables - 'Company Advertising' and 'Brand Revenue' of my data frame 'htmltable' , when the another variable 'Industry' is 'Luxury'; using ggplot() function. I am using another variable of my data frame 'Brand Value' as colour variable.
p<- ggplot(htmltable[htmltable$Industry='Luxury',],aes(x='CompanyAdvertising',y='BrandRevenue') q <- p+geom_point(aes(color='BrandValue',size='BrandValue') + geom_text(label='Brand') r <- q+xlab("Company Advertisiment in Billions")+ylab("Brand Revenue in Billions") +ggtitle("Luxury") r+theme(plot.title=element_text(size=10,face='bold'),legend.key=element_rect(fill='light blue')) Here, I want to change my legend title from "BrandValue" to "BrandValue in Billions". Please suggest. I tried using labs parameter in the below statement. But it is resulting in 2 legends. r <- q+xlab("Company Advertisiment in Billions")+ylab("Brand Revenue in Billions") +ggtitle("Luxury")+labs(colour="BrandValue in Billions") Thanks, Udhay [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.