(2)main参数 字符串,给出图形的标题;
(3)sub参数 字符串,给出图形的子标题;
(4)xlab 和 ylab参数 字符串,用于给出x轴和y轴的标签。...(5)xlim 和 ylim参数 都是二维向量,分别表示x轴和y轴的取值范围。...ggplot(data, aes(x, y)) + geom_point()
aes中的x,y值分别表示在x,y轴的变量;geom_point表示增加散点图图层。...ggplot(data, aes(x, y, colour)) + geom_point()#设置colour参数以颜色区分
ggplot(data, aes(x, y, shape)) + geom_point...()#设置shape参数以形状区分
library(ggplot2)
#read in data
data = read.table("scatter_plot-3.txt", header=T, sep