Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Yiguan opened this issue Jul 14, 2023 · 0 comments
Open

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

Yiguan opened this issue Jul 14, 2023 · 0 comments

Comments

@Yiguan
Copy link

Yiguan commented Jul 14, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant