R/utilities.R

Defines functions is.coord_flip

## derive from ggtree::get_taxa_name
get_taxa_order <- function (tree_view) {
    df <- tree_view$data
    with(df, {
        i = order(y, decreasing = T)
        label[i][isTip[i]]
    })
}


theme_no_margin <- getFromNamespace("theme_no_margin", "ggfun")


is.coord_flip <- function(p) {
    inherits(p, "gg") && inherits(p$coordinates, "CoordFlip")
}

Try the aplot package in your browser

Any scripts or data that you put into this service are public.

aplot documentation built on Oct. 6, 2023, 9:07 a.m.