开发者

Multiple Plots in the Same Figure [R]

开发者 https://www.devze.com 2023-01-18 12:51 出处:网络
I would like to plot two functions f开发者_如何学C1 and f2 on the same graph. With the following code, I found that the scale of the y axes for the two plots are different. Is there a way to make the

I would like to plot two functions f开发者_如何学C1 and f2 on the same graph. With the following code, I found that the scale of the y axes for the two plots are different. Is there a way to make the scales same?

plot(f1, 0, 1)
par(new=TRUE)
plot(f2, 0, 1)


Use the curve function:

plot(f1, 0, 1)
curve(f2, 0, 1, add=TRUE)
0

精彩评论

暂无评论...
验证码 换一张
取 消