1. X/Y 坐标值
x <- seq(-4, 4, len = 101)
y <- cbind(sin(x), cos(x))
matplot(x, y, type = "l", xaxt = "n", yaxt="n")
### xaxt = "n", yaxt="n" => x, y 不画x, y坐标
axis(1, at = c(-pi, -pi/2, 0, pi/2, pi), labels = expression(-pi, -pi/2, 0, pi/2, pi))
###x轴 画坐标,在指定的位置画指定的坐标
axis(2, at = c(-0.8, -0.5, 0, 03, 0.7), labels = expression(-pi, -pi/2, 0, pi/2, pi))
###y轴 画坐标,在指定的位置画指定的坐标
2. Lengend
legend(1, 0.4, c("Case", "Control", "HapMap"), col = c("red", "blue", "green"), lty = c(1, 1, 1), pch = c(1, 1, 1), merge = TRUE, bg = 'gray90')
第一项:x坐标;第二项:y坐标;第三项:text;第四项:颜色;第五项:线型;第六项:点型
No comments:
Post a Comment