Learn R Programming

ggenealogy (version 0.2.0)

plotPath: Construct the graphic object of the path

Description

This function takes the path as input and outputs an ggplot2 object. The image will correctly position the node labels with x-axis representing the node year, and y-axis representing the node path index. Edges between two nodes represent parent-child relationships between those nodes. For visual appeal, there is a grey box that outlines the node label, as well as an underline and overline for each label.

Usage

plotPath(path, fontFace = 1)

Arguments

path
object created from function getPath
fontFace
fontface for the two nodes of interest (1=plain, 2=bold, 3=italic, 4=bold-italic), DEFAULT is 1

See Also

getPath for information on input path building

Examples

Run this code
data(sbGeneal)
ig <- dfToIG(sbGeneal)
p <- getPath("Brim", "Bedford", ig, sbGeneal)
plotPath(p)
plotPath(p, fontFace = 4)

Run the code above in your browser using DataLab