I am trying to do a boxplot with GGplot and I get only one box when I do a ggplot like
ggplot(data_frame, aes(x=probs, y=values)) +
geom_boxplot(color="red", fill="orange", alpha=0.5)
while I should be getting 3 boxes when I do the normal plot:
boxplot(values ~ probs, data = data_frame,
xlab = "Probabilities",
ylab = "Values (1Q, Mean, Median, StdDev, 3Q)",
main = "1Q, Mean, Median, StdDev, 3Q",
col = c("green","yellow","purple"))
Sample data:
> head(data_frame,20)
values probs
1 16.000 0.3
2 18.000 0.3
3 18.000 0.3
4 3.550 0.3
5 20.000 0.3
6 27.000 0.5
7 30.000 0.5
8 30.000 0.5
9 3.873 0.5
10 33.000 0.5
11 46.000 0.8
12 48.000 0.8
13 48.000 0.8
14 3.098 0.8
15 50.000 0.8
Any pointers is much appreciated. Thanks!