Error in ggplot

Hello R users,

I am getting an error while running following code.

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) +

An error i am getting is:
Error: Must request at least one colour from a hue palette.

Please help me to solve this.

It doesn't look like you provided enough code to reproduce your issues. (Be sure to ask questions like this with a reprex FAQ: What's a reproducible example (`reprex`) and how do I create one?)

There's a few ways to get this error. One of your color parameters might be all NAs,

Some discussion;

Again, asking this question with a reprex will help folks help you.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.