# R Package ggplot2 Notes

## 1. Basic grammar

### 1.1 Plot types

The R package ggplot2 is a famous plot tool for high quality scientific figures. The ggplot2 style figures are widely seen in papers published in high quality journals such as PNAS, Nature and Cell.

The input data should be in data frame form, and it is easily to use the function as.data.frame(). “+” is used to connect different plot statement. A typical ggplot2 plot statement is like:

• 进化树展示

## 1. 安装

rpy2作为Python的一个模块，其安装非常方便。需要做的准备工作是在本地安装好R。