ggtree icon indicating copy to clipboard operation
ggtree copied to clipboard

geom_highlight compresses the tree slightly

Open maxfarrell opened this issue 1 year ago • 1 comments
trafficstars

I am trying to add a geom_hilight layer to identify two clades in a phylogeny. The tree is then aligned to a heatmap with cowplot. The alignment works well without the geom_hilight, but once it has been added, the tips of the tree become slightly compressed, and no longer properly aligns with the figure next to it.

I have tried adjusting plot margins of the tree, but the compression and subsequent mis-alignment is till taking place.

Any advice would be great!

maxfarrell avatar Mar 07 '24 09:03 maxfarrell

try adding scale_y_continuous(expand = expansion(0,0)) to the plot

wvictor14 avatar Jul 25 '24 18:07 wvictor14