uclahs-cds / package-CancerEvolutionVisualization

Publication Quality Phylogenetic Tree Plots
https://cran.r-project.org/web/packages/CancerEvolutionVisualization/
GNU General Public License v2.0
2 stars 0 forks source link

Bugs in y-axis display modes #50

Closed dan-knight closed 1 year ago

dan-knight commented 1 year ago

Verify that the y-axes are shown/hidden when expected.

No Branch Lengths

When no branch lengths are passed, a y-axis is still created. This shouldn't happen, as the lengths mean nothing.

tree <- data.frame(parent = c(NA, 1, 2, 3), drop = FALSE);
grid.draw(SRCGrob(tree));

noparent

Both Branch Lengths

When two branch length columns are passed, there is still only one y-axis (using the scale of the first branch length column).

tree <- data.frame(
    parents = c(NA, 1, 2, 3),
    length1 = c(10, 20, 20, 25),
    length2 = c(100, 150, 50, 5)
    );

both rid.draw(SRCGrob(tree));