服务热线
178 0020 3020
#mission2-1
x <- c(0, 10, 20, 30, 40, 50)
y <- c(100, 200, 400, 350, 200, 50)
png(file="E:/R learning/mission2-1.png")
plot(x,
y,
type = "o",
xlab = "Leu浓度",
ylab = "增殖数目",
col = "green",
main = "不同浓度亮氨酸处理与细胞增殖数目的情况",
cex.main = 1.5
)
dev.off()
#mission2-2
a <- c(198,93,210,320,127,260)
b <- c(332,210,467,882,156,960)
png(file="E:/R learning/mission2-2.png")
plot(a,
type = "o",
col = "red",
ylim = c(0,1000),
xlab = "Month",
ylab = "RMB",
main = "Expense"
)
lines(b,
type = "o",
col = "blue"
)
dev.off()
#mission2-3
w <- c(23.7, 45.3, 67.5, 55.2, 30.9, 41.8, 64.7, 57.4, 26.5, 35.2, 44.0, 63.1, 52.3, 32.8, 38.2)
png(file="E:/R learning/mission2-3.png")
hist(w,
freq = F,
xlab = "w",
main = "Histogram of w"
)
lines(density(w),col = "red")
dev.off()
附件