1.We present an R package, ggtree, which provides programmable visualization and annotation of phylogenetic trees. 2.ggtree can read more tree file formats than other software; including newick, nexus, NHX, phylip and jplace formats and supports visualization of phylo, multiPhylo, phylo4, phylo4d, obkData and phyloseq tree objects defined in other R packages. It can also extract the tree/branch/node-specific and other data from the analysis outputs of BEAST, EPA, HYPHY, PAML, PHYLODOG, pplacer, r8s, RAxML and RevBayes software, and allows using these data to annotate the tree. 3.The package allows coloring and annotation of a tree by numerical/categorical node attributes, manipulating a tree by rotating, collapsing and zooming out clades, highlighting user selected clades or operational taxonomic units and exploration of a large tree by zooming into a selected portion. 4.A two-dimensional tree can be drawn by scaling the tree width based on an attribute of the nodes. A tree can be annotated with an associated numerical matrix (as a heatmap), multiple sequence alignment, subplots or silhouette images. 5.The package ggtree is released under the Artistic-2.0 License. The source code and documents are freely available through Bioconductor (http://www.bioconductor.org/packages/ggtree).