Skip to content

geom_fruit() doesn't work with geom_line? #30

@Yiguan

Description

@Yiguan

Hi,

Here is an example code with geom_tile:

trfile <- system.file("extdata", "tree.nwk", package="ggtreeExtra")
tree <- read.tree(trfile)
ring1 <- system.file("extdata", "first_ring_discrete.csv", package="ggtreeExtra")
dat2 <- read.csv(ring1)

p <- ggtree(tree)
p +  geom_fruit(
        data=dat2,
        geom=geom_tile, # geom_tile works well
        mapping=aes(y=ID, x=Pos, color=Type)
    ) 

It works well with geom_tile, geom_point, but if it is changed to geom_line, then the line layer will be shown on the left of the panel (overlaid with the root of the tree). I expect it to be the right side corresponding to the tips, as geom_tile or geom_point does.

I am not sure if geom_line not supported by geom_fruit yet, or somewhere I go wrong. Thanks in advance!!

Yiguan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions