Hi Rajesh, 2019-05-05 10:23 +0530, Rajesh Ahir_GJ wrote: > Hello R users, > > I am getting an error while running following code. > > library(ggplot2) > ggplot(hourly_data1,aes(hour, power))+ > geom_boxplot(aes(fill=monthname),outlier.shape=NA) + > facet_wrap(~monthname) > ggplot(hourly_data1,aes(hour, power))+ > geom_boxplot(aes(fill=dayname),outlier.shape=NA) + > facet_wrap(~dayname) + > geom_smooth(aes(group=1)) > > An error i am getting is: > Error: Must request at least one colour from a hue palette. > > Please help me to solve this.
1) A sample data would be nice, it is hard to debug without proper data :-) 2) One thing you could check: is there any NAs in you data, i.e. in the variable used for 'fill'? Check this first. 3) You have two 'ggplot' commands in your example. Do you get the error for both or just for one? Best, Kimmo ______________________________________________ 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.