[英]Plot multiple curves in the same plot in R
使用geom_function
的ggplot
選項,如下所示:
library(ggplot2)
ggplot() +
geom_function(fun = function(x) sin(x)) +
geom_function(fun = function(x) cos(x)) +
geom_function(fun = function(x) 3*x) +
labs(x = "x", y = "y") +
theme_bw()
使用reprex v2.0.2創建於 2022-08-27
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.