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