Skip to content

beast2 tree geom_range error #671

@SpelaBo

Description

@SpelaBo

When plotting beast2 phylogeny, geom_range throws an error. Tested on various phylogenies, including the one used in beast tutorial.

> tree_file <- "https://github.com/Taming-the-BEAST/Visualizing-BEAST2-results/raw/refs/heads/main/precooked_runs/Primates.MCC.tree" 
> tree <- read.beast(tree_file)
> ggtree(tree,  mrsd = NULL) + 
+     theme_tree2() +
+     geom_range(range = 'height_0.95_HPD',color = pal_jco("default")(1), alpha = 0.2, size = 2) 
Error in `scale_y_continuous()`:
! Discrete value supplied to a continuous scale.
ℹ Example values: "range_lower(height_0.95_HPD)".

> packageVersion("ggtree")
[1] ‘3.99.0’

Best, Špela

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