1 曲线簇
题目1: 函数 \(xy = z\),\(z\) 取值为 1、2、3、4, \(x\) 和 \(y\) 的取值区间为 (0, 10],如何画出这4条曲线?
N 版
x <- seq(0.1, 10, by = 0.1)
plot(x, 1 / x,
type = "l", xlab = "x", ylab = "y"
)
for (z in 2:4) lines(x, z / x, col = z)
legend("topright",
legend = 1:4, col = 1:4,
lty = 1, title = "z"
)
T 版