Skip to content

use graph layout to visualize tree #460

@GuangchuangYu

Description

@GuangchuangYu

pseudo-code:

ggtree <- function(..., layout = "xxx", ...) {
...
 if {layout not defined in ggtree} {
       p <- ggplot(..., layout = 'equal_angle')
       convert tree to igraph object
       apply layout to the object and extract node coordination
      replace p$data$x and p$data$y with new coordination
}

....

}

In this way, we can mostly keep the ggtree package unchanged, while supporting graph layouts.

see also 3ee8a38.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions