[R] Odp: how to draw pentagon?

Petr PIKAL petr.pikal at precheza.cz
Tue Aug 18 15:02:34 CEST 2009


r-help-bounces at r-project.org napsal dne 18.08.2009 06:13:09:

> Hi everyone,
> I want you all help me to give an idea, how to draw pentagon with 
> Maybe can use function, but I'm stuck.

Maybe. Maybe you can use a pencil, instead.

Basically this

plot(1:10, type="n")
polygon(c(2,3,5,6,4), c(5,3,3,5,7))
points(c(2,3,5,6,4), c(5,3,3,5,7))

will draw one of infinite number of pentagons.

If you can establish a function for drawing any pentagon in any display 
with any range it would be more complicated and you probably need to study 
?grDevices and ?par more thoroughly


> Yhank you.
> -- 
> Hemavathi Ramulu
>    [[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list