map.ind {soc.ca} | R Documentation |
Map the individuals of a soc.ca analysis
Description
Creates a map of the individuals on two selected dimension.
Usage
map.ind(
object,
dim = c(1, 2),
point.shape = 21,
point.alpha = 0.8,
point.fill = "whitesmoke",
point.color = "black",
point.size = 3,
label = FALSE,
label.repel = FALSE,
label.alpha = 0.8,
label.color = "black",
label.size = 4,
label.fill = NULL,
map.title = "ind",
labelx = "default",
labely = "default",
legend = NULL
)
Arguments
object |
|
dim |
the dimensions in the order they are to be plotted. The first number defines the horizontal axis and the second number defines the vertical axis. |
point.shape |
a numerical value defining the shape of the points. It may be mapped to a variable with a suitable length and order. |
point.alpha |
defines the alpha of the points. Values range from 0 to 1. It may be mapped to a variable with a suitable length and order. |
point.fill |
defines the fill color of the points. It may be mapped to a variable with a suitable length and order. |
point.color |
defines the color of the points. It may be mapped to a variable with a suitable length and order. See colors for some of the valid values. |
point.size |
a numerical value defining the size of the points. It may be defined by a variable with a suitable length. |
label |
if TRUE each point is assigned its label, defined in the soc.ca object. See assign.label and add.to.label for ways to alter the labels. |
label.repel |
if TRUE overlapping labels are rearranged, see geom_text_repel or geom_label_repel. |
label.alpha |
defines the alpha of the labels. Values range from 0 to 1. It may be mapped to a variable with a suitable length and order. |
label.color |
defines the color of the labels. It may be mapped to a variable with a suitable length and order. See colors for some of the valid values. |
label.size |
defines the size of the labels. It may be mapped to a variable with a suitable length and order. |
label.fill |
defines the color of the box behind the labels. It may be mapped to a variable with a suitable length and order. This only works if label.repel is TRUE. See geom_label_repel. |
map.title |
the title of the map. If set to its default the standard title is used. |
labelx |
the label of the horizontal axis. If set to NULL a standard label is used. |
labely |
the label of the vertical axis. If set to NULL a standard label is used. |
legend |
if set to TRUE a legend is provided. Change the legend with the guides, theme and linkguide_legend functions from the ggplot2 package. |
Examples
example(soc.ca)
map.ind(result)
map.ind(result, map.title = "Each individual is given its shape according to a value in a factor",
point.shape = active[, 1], legend = TRUE)
map <- map.ind(result, map.title = "The contribution of the individuals with new scale",
point.color = result$ctr.ind[, 1], point.shape = 18)
map + scale_color_continuous(low = "white", high = "red")
quad <- create.quadrant(result)
map.ind(result, map.title = "Individuals in the space given shape and color by their quadrant",
point.shape = quad, point.color = quad)