[R] Visualize quartiles of plot line

Arne Brutschy abr-r-project at xylon.de
Sun Jun 17 09:53:19 CEST 2007


Hi,

concerning the missing se coloring: I followed the examples on
http://had.co.nz/ggplot2/stat_smooth.html

 c <- ggplot(mtcars, aes(y=wt, x=qsec))

 c + stat_smooth()
 c + stat_smooth() + geom_point()
 c + stat_smooth(se = TRUE) + geom_point()
 c + stat_smooth(fill=alpha("blue", 0.2), colour="darkblue", size=2)
 c + geom_point() + stat_smooth(fill=alpha("blue", 0.2), colour="darkblue", size=2)
Does not work, se is missing.

 c + stat_smooth(fill="blue", colour="darkblue", size=2)
Does work.

 c + stat_smooth(method = lm, formula= y ~ ns(x,3)) + geom_point()
 c + stat_smooth(method = rlm, formula= y ~ ns(x,3)) + geom_point()
Does not work:
"Error in model.frame(formula = formula, data = data, weights = weight,  :
                 ..2 used in a wrong context, no ... to read"

All other examples on the page do not work. This seems to be a bug,m
right? Tell me if I can be of any use fixing this.

Regards,
Arne
 
h> On 6/16/07, Arne Brutschy <abr-r-project at xylon.de> wrote:
>> Hello,
>>
>> I'm currently using a simple plot to visualize some mean values. I'm
>> having ~200 datapoints on the x-axis, each has 10 records. I'm
>> currently plotting only the mean value of each of the datapoints.
>>
>> What I need is a way to visualize the quartiles/error/whatever of
>> these points. I thought about boxplots, but I have to many points on
>> the xaxis - it would be impossible to see anything. I though that it
>> would be nice to have a "hull" around each line, indicate the width of
>> the quartiles, visualized by a different background. It's like a very
>> wide boxplot with a changing mean value...
>>
>> Is this possible with r? Does anyone know what I mean and/or has done
>> this before?
>>
>> Thanks
>> Arne
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>



More information about the R-help mailing list