Hello!
I have a problem: I keep getting extra data points in my boxplot and I can’t get rid of them…! This picture explains my problem te best:
I want to lose the coloured dots and only keep the jitter if that’s possible. my data is:
data = df
x : like_flower >> whether people like or don’t like flowers (1=yes, 0=no)
y: sales_index >> sales index of sold flowers in 1 year
I used:
ggplot(df, aes(x = factor(like_flower), y = sales_index)) +
geom_boxplot(aes(colour=factor(like_flower)), width = 0.8) +
geom_jitter(aes(fill=factor(like_flower)), alpha = 0.6)
does somebody know how I can get rid of the coloured datapoints in my graph :)? Hope so…
[Update] found it… : add outlier.shape = NA >>
ggplot(df, aes(x = factor(like_flower), y = sales_index)) +
geom_boxplot(aes(colour=factor(like_flower)), width = 0.8, outlier.shape = NA) +
geom_jitter(aes(fill=factor(like_flower)), alpha = 0.6)