ggdrawPolygon: Draw a Polygon in a 'ggplot2' based graph

View source: R/ggdrawPolygon.R

ggdrawPolygonR Documentation

Draw a Polygon in a ggplot2 based graph

Description

ggdrawPolygon: Draws a Polygon in a ggplot2-based factorial graph (e.g., from CA or PCA).

Usage

ggdrawPolygon(
  F,
  order2draw = 1:nrow(F),
  color = "darkorchid",
  linetype = 3,
  size = 0.5,
  fill = "darkorchid",
  alpha = 0.2,
  ...
)

Arguments

F

a set of 2-dimensional coordinates

order2draw

(Default: 1:nrow(F)) the order of the points to draw the polygon.

color

(Default: 'darkorchid') the color of the line of the polygon.

linetype

(Default: 3, i.e., dotted line), the line type to draw the polygon.

size

(Default: .5) the size of the line.

fill

(Default: 'darkorchid') the color to fill-in the polygon.

alpha

(Default: .2) the transparency fa ctor for the fill-in color of the polygon (gors from 0 completely transparent to 1: opaque).

...

other stuff to be passed to ggplot2::geom_polygon if needed.

Details

ggdrawPolygon is mostly a wraper around ggplot2::geom_polygon.

Value

a polygon to be added to a ggplots2 image.

Author(s)

Hervé Abdi

See Also

geom_polygon


HerveAbdi/PTCA4CATA documentation built on July 17, 2022, 5:41 a.m.