R ggplot2 boxplot not properly shown when knitting html -
tried boxplot ggplo2
ggplot(aes(x = quality, y = residual.sugar),data=data)+ geom_boxplot(fill="#9999cc")+scale_y_continuous(limits =c (0,20)) when exucute in r itself, looks want , this: 
but when knit html file, looks :

anyone knows how fix that? confused :(
the difference forgot make quality factor within rmd file.
for example:
set.seed(101) dd <- data.frame(quality = sample(6:9,size=200,replace=true), residual.sugar = rnorm(200)) library(ggplot2) ggplot(aes(x = quality, y = residual.sugar),data=dd)+ geom_boxplot() 
dd2 <- transform(dd,quality=factor(quality)) ggplot(aes(x = quality, y = residual.sugar),data=dd2)+ geom_boxplot() 
Comments
Post a Comment