[R] filling the area
Mauricio Cardeal
mcardeal at ufba.br
Thu Jan 25 15:14:00 CET 2007
Thank you all. One more question about the syntax below: min(y) twice, is it?
polygon(c(min(x), x, max(x)), c(min(y), y, min(y)), col = "blue")
polygon( c(min(x), x, max(x)), c( min(y), y, min(y)), density=100 )
Best whises,
Mauricio
Marc Schwartz escreveu:
> On Thu, 2007-01-25 at 10:18 -0300, Mauricio Cardeal wrote:
>
>> 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
>>
>
> See ?polygon
>
> x <- 1:10
> y <- rnorm(10)
>
> plot(x,y, type = "o")
>
> polygon(c(min(x), x, max(x)), c(min(y), y, min(y)), col = "blue")
>
>
> HTH,
>
> Marc Schwartz
>
>
>
> __________ NOD32 1.1752 (20060912) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.nod32.com
>
>
>
>
More information about the R-help
mailing list