[R] filling the area
Mario Cortina Borja
M.Cortina at ich.ucl.ac.uk
Thu Jan 25 14:43:22 CET 2007
Hi Mauricio,
Try:
plot(x,y); lines(x,y)
polygon( c(min(x), x, max(x)), c( min(y), y, min(y)), density=100 )
Best wishes,
Mario
Dr Mario Cortina Borja
Senior Lecturer in Statistics
Centre for Paediatric Epidemiology and Biostatistics
Institute of Child Health, University College London
M.Cortina at ich.ucl.ac.uk
Tel - 020 7905 2113
FAX - 020 7905 2381
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-
> bounces at stat.math.ethz.ch] On Behalf Of Mauricio Cardeal
> Sent: 25 January 2007 13:19
> To: r-help at stat.math.ethz.ch
> Subject: [R] filling the area
>
> Please, how to fill the area under the curve?
>
> x <- c(1:10)
> y <- c(rnorm(10))
> plot(x,y)
> lines(x,y)
>
> Thanks,
> Mauricio Cardeal
>
> ______________________________________________
> 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