when I fill the histogram by group I always get a colored part which I couldn't match it with the chart after I split it by using facet .
i have the below data.frame :
mysales <- data.frame(season=c(rep("s1",10000),rep("s2",6000),rep("s3",9000),rep("s4",3000)),
sales=c(rnorm(10000,mean=0.2,sd=0.1),rnorm(6000,mean=0.6,sd=0.1),rnorm(9000, 1,sd=0.1),rnorm(3000,mean =1.5,sd=0.1 )))
look at the circled part in the graph before splitting it :
ggplot(mysales, aes(x=sales, fill=season)) +geom_histogram(alpha=0.6)
by faceting the groups :
ggplot(mysales, aes(x=sales, fill=season)) +geom_histogram(alpha=0.6)+facet_wrap(~season)
the question :
why the circled part is showing in the first chart , is it an error in plotting .. is their a way to correct it ?