Last chance! 50% off unlimited learning
Sale ends in
Add a "piecharts" layer to a lifemap_obj object.
lm_piecharts(
data = NULL,
param,
type = c("pie", "bar", "polar-area", "polar-radius", "auto"),
width = 30,
height = 30,
opacity = 1,
showLabels = FALSE,
pal = "Accent",
legend = TRUE,
legendPosition = c("topright", "bottomright", "bottomleft", "topleft"),
display = c("auto", "requested", "all", "leaves")
)
An lm_piecharts object containing all aesthetics details for one layer of charts
A sub dataset to use, if NULL then all of the taxids from the lifemap object given to lifemap() will be used.
A column name indicating the discret variable to be represented.
The type of chart to draw.
The maximal width of the charts.
The maximal height of the charts.
The chart's opacity.
A boolean indicating whether to display the values directly on the chart or not.
The palette to be used for the charts.
A boolean indiacting whether to draw the legend or not.
c("topright", "bottomright", "bottomleft", "topleft"). Where should the legend be placed.
c("auto", "requested", "all", "leaves"), a string indicating how to display charts :
"auto" : the markers are displayed depending on the zoom level, by default, allow to have a lot of charts
"requested" : only displays the requested taxa, but all at the same time
"all" : displays all the taxa including all the ancestors to the root
"leaves" : displays only the latest (most recent) taxa
(WARNING : "requested", "leaves" and "auto" shouldn't be used to display more than 2000 charts as it may result in long computing time)
data(LM_eukaryotes)
lm_piecharts(param = "Status")
lm_piecharts(data = LM_eukaryotes$df[LM_eukaryotes$df$Group %in% "Plants", ], param = "Status")
Run the code above in your browser using DataLab