Last active
March 15, 2019 21:42
-
-
Save dwbapst/f6f1da426df46907b64e4b9df63cb39d to your computer and use it in GitHub Desktop.
Code for Plotting a Nice 78-Taxon Phylogeny with Stratigraphic Ranges, Upward Orientation, Phylopics, White Foreground Color with Black Background, etc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
devtools::install_github("dwbapst/paleotree", ref="dev_refinedphylopicfun") | |
library(paleotree) | |
taxaSeventyEight <- c( | |
"Archaeopteryx", "Pinus", "Procoptodon", "Olenellus", "Eldredgeops", | |
"Quetzalcoatlus", "Homo", "Tyrannosaurus", "Triceratops", "Giraffa", | |
"Bolivina", "Cancer", "Dicellograptus", "Dunkleosteus", "Solanum", | |
"Anomalocaris", "Climacograptus", "Halysites", "Cyrtograptus", | |
"Procoptodon", "Megacerops", "Moropus", "Dimetrodon", "Lingula", | |
"Rhynchosaurus", "Equus", "Megaloceros", "Rhynchotrema", "Pecten", | |
"Echinaster", "Eocooksonia", "Neospirifer", # "Prototaxites", | |
"Cincinnaticrinus", "Nemagraptus", "Monograptus", "Pongo", "Acropora", | |
"Histiodella", "Agathiceras", "Juramaia", "Opabinia", "Arandaspis", | |
"Corvus", "Plethodon", "Latimeria", "Phrynosoma", "Araucarioxylon", | |
"Velociraptor", "Hylonomus", "Elginerpeton", "Rhyniognatha", | |
"Tyto", "Dromaius", "Solenopsis", "Gorilla", "Ginkgo", "Terebratella", | |
"Caretta", "Crocodylus", "Rosa", "Prunus", "Lycopodium", "Meganeura", | |
"Diplodocus", "Brachiosaurus", "Hepaticae", "Canadaspis", "Pikaia", | |
"Smilodon", "Mammuthus", "Exaeretodon", "Redondasaurus", "Dimetrodon", | |
"Megatheriidae", "Metasequoia", "Aedes", "Panthera", "Megalonyx") | |
data <-getSpecificTaxaPBDB(taxaSeventyEight) | |
tree <- makePBDBtaxonTree(data, rank = "genus") | |
timeTree <- dateTaxonTreePBDB(tree, | |
minBranchLen = 10) | |
file <- "tree_taxa78_03-15-19c.png" | |
png(file = file, | |
height = 5, width = 12, | |
units = "in", res = 300) | |
par(bg="black") | |
par(mar=c(0,0,3,0)) | |
taxaColors <- rep("white",Ntip(timeTree)) | |
taxaColors[4] <- "red" | |
plotPhyloPicTree( | |
tree = timeTree, | |
orientation = "upwards", | |
addTaxonStratDurations = TRUE, | |
edge.color = "white", | |
maxAgeDepth = 700, | |
taxaColor=taxaColors, | |
depthAxisPhylo = TRUE, | |
colorAxisPhylo = "white") | |
dev.off() | |
shell.exec(file) |
Author
dwbapst
commented
Mar 15, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment