powered by
Add a "branches" layer to a lifemap_obj object.
lm_branches( data = NULL, color = NULL, var_color = NULL, size = 5, min = 2, max = 20, opacity = 0.5, FUN = NULL, legend = TRUE, legendPosition = c("topright", "bottomright", "bottomleft", "topleft") )
An lm_branches object containing all aesthetics details for one layer of branches
A sub dataset to use, if NULL then all of the taxids from the lifemap object given to lifemap() will be used.
Either a color for the branches or a palette if a variable is used to represent branches' color.
A column name of the original dataframe to represent this variable by the color of branches.
Either a numeric for the branche's thickness or a variable to be represented by the branche's thickness.
An integer indicating the minimal thickness of the branches if the size is a column name.
An integer indicating the maximal thickness of the branches if the size is a column name.
An integer indicating branche's opacity.
The function to be applied to infer values. If NULL values won't be inferred
A logical indicating whether or not to display the legend.
c("topright", "bottomright", "bottomleft", "topleft"), the position of the legend.
data(LM_eukaryotes) lm_branches(var_color = "GC.", color = "Accent") lm_branches(data = LM_eukaryotes$df[LM_eukaryotes$df$Group %in% "Plants",])
Run the code above in your browser using DataLab