geom_strip | R Documentation |
annotate associated taxa (from taxa1 to taxa2, can be Monophyletic, Polyphyletic or Paraphyletc Taxa) with bar and (optional) text label
geom_strip(
taxa1,
taxa2,
label,
offset = 0,
offset.text = 0,
align = TRUE,
barsize = 0.5,
extend = 0,
fontsize = 3.88,
angle = 0,
geom = "text",
hjust = 0,
color = "black",
fill = NA,
family = "sans",
parse = FALSE,
...
)
taxa1 |
taxa1 |
taxa2 |
taxa2 |
label |
add label alongside the bar (optional) |
offset |
offset of bar and text from the clade |
offset.text |
offset of text from bar |
align |
logical, whether to align bars to the most distant bar ,defaults to "TRUE" Note that if "FALSE", the bars might cross the tree |
barsize |
set size of the bar |
extend |
extend bar length vertically |
fontsize |
set size of the text |
angle |
set the angle of text |
geom |
one of 'text' or 'label' |
hjust |
adjust the horizonal position of the bar |
color |
set color for bar and label |
fill |
set color to fill label background, only work with geom='label' |
family |
"sans" by default, can be any supported font |
parse |
logical, whether to parse labels, if "TRUE", the labels will be parsed into expressions, defaults to "FALSE" |
... |
additional parameter |
ggplot layers
Guangchuang Yu
For more detailed demonstration of this function, please refer to chapter 5.2.1 of Data Integration, Manipulation and Visualization of Phylogenetic Trees http://yulab-smu.top/treedata-book/index.html by Guangchuang Yu.
library(ggtree)
tr<- rtree(15)
x <- ggtree(tr)
x + geom_strip(13, 1, color = "red") + geom_strip(3, 7, color = "blue")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.