r - Fail to use boxplot in ggplot2 -


given such data frame:

dt       val 02-09     0.1 02-09     0.2 02-09     0.15 02-10     0.3 02-10     -0.1 ... 

i want use boxplot show medium, variance of val in each dt:

 ggplot(data = df,aes(y=val,x=dt)) + geom_boxplot() 

but got : enter image description here

it can observed there 1 box. when tried outlier.colour = "red", points red. why? values in interval of (-1,1)

this should explain problem:

set.seed(42) x <- rnorm(10) x <- c(x, rep(0, 100)) #add 100 0 values boxplot(x) 

resulting plot

quantile(x, c(0.25, 0.5, 0.75)) #25% 50% 75%  #  0   0   0 

if have many (almost) identical values, quartiles (almost) identical.


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -