在同一图中绘制多个函数曲线 [英] Draw more than one function curves in the same plot
本文介绍了在同一图中绘制多个函数曲线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
一种绘制与给定函数相对应的曲线的方法是:
A way to draw the curve corresponding to a given function is this:
fun1 <- function(x) sin(cos(x)*exp(-x/2))
plot (fun1, -8, 5)
如何在同一图中添加另一个函数的曲线(例如fun2,它也由其数学公式定义)?
How can I add another function's curve (e.g. fun2, which is also defined by its mathematical formula) in the same plot?
推荐答案
plot (fun2, -8, 5, add=TRUE)
也请查看帮助页面中的curve
.
Check also help page for curve
.
这篇关于在同一图中绘制多个函数曲线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文