View source: R/functions_plot.r
map.path | R Documentation |
Plot a path along an ordered variable. If the variable is numerical it is cut into groups by the min_cut function.
map.path(
object,
x,
map = map.ind(object, dim),
dim = c(1, 2),
label = TRUE,
min.size = length(x)/10,
...
)
object |
is a soc.ca result object |
x |
is an ordered vector, either numerical or factor |
map |
is a plot object created with one of the mapping functions in the soc.ca package |
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. |
label |
if TRUE the label of the points are shown |
min.size |
is the minimum size given to the groups of a numerical variable, see min_cut. |
... |
further arguments are passed onto geom_path, geom_point and geom_text from the ggplot2 package |
example(soc.ca)
map <- map.ind(result, point.color = as.numeric(sup$Age))
map <- map + scale_color_continuous(high = "red", low = "yellow")
map.path(result, sup$Age, map)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.