Nothing
knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.width = 10, fig.height = 7 )
Rclade defaults to the viridis palette, which is:
- Color-blind friendly
- Grayscale friendly
- Perceptually uniform
library(Rclade) data(example_tree) # Default viridis palette p <- plot_timetree(example_tree, rank = "phylum", taxonomy_format = "GTDB", add_timescale = FALSE) print(p)
# Custom color mapping for specific groups p <- plot_timetree(example_tree, rank = "phylum", taxonomy_format = "GTDB", add_timescale = FALSE, color_mapping = c("Proteobacteria" = "#E41A1C", "Firmicutes" = "#377EB8")) print(p)
# Inside the plot (default) p <- plot_timetree(example_tree, rank = "phylum", taxonomy_format = "GTDB", add_timescale = FALSE, legend_position = c(0.05, 0.85)) # Standard positions p <- plot_timetree(example_tree, rank = "phylum", taxonomy_format = "GTDB", add_timescale = FALSE, legend_position = "right")
p <- plot_timetree(example_tree, rank = "phylum", taxonomy_format = "GTDB", add_timescale = FALSE, show_clade_label = TRUE) print(p)
Before finalizing your figure, verify label parsing quality:
summarize_taxonomy_quality(example_tree$tip.label, format = "GTDB")
Process multiple tree files at once:
batch_plot(input_dir = "trees/", output_dir = "figures/", pattern = "*.tre", rank = "phylum", taxonomy_format = "GTDB")
save_session_info("session_info.txt")
Rclade builds on the ggtree and deeptime R packages. If you use Rclade in published research, please cite Rclade along with these key dependencies:
The geological timescale data is based on the ICS International Chronostratigraphic Chart 2023/02 (https://stratigraphy.org/chart/).
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.