plot_file <- system.file("extdata", "tree_plot.rds", package = "TransProR")
p2_plot <- readRDS(plot_file)
# Please replace the following vectors with your specific values
nodes <- c(117, 129, 125, 127, 119,
123, 139, 166, 124, 131, 217) # x-values of the nodes you want to highlight
fill_colors <- c("#CD6600", "#CD6600", "#CD6600",
"#CD6600", "#009933", "#009933",
"#009933", "#009933", "#9B30FF",
"#9B30FF", "#9B30FF") # Fill colors
alpha_values <- c(0.3, 0.3, 0.3, 0.3, 0.2, 0.3,
0.3, 0.3, 0.3, 0.3, 0.3) # Transparency values
extend_values <- c(25, 24, 24, 25, 25, 25,
24, 24, 25, 24, 24) # Values for the 'extend' parameter
p2 <- highlight_by_node(
p2_plot,
nodes,
fill_colors,
alpha_values,
extend_values
)
Run the code above in your browser using DataLab