1
Einfaches Beispiel einer Funktion Zeichnung:Funktion in ggplot Draw - Liste der Parameter
p <- ggplot(data = data.frame(x = 0), mapping = aes(x = x))
p + stat_function(fun = function(x) x^2 + 1*2)
Ist es möglich, eine Liste von Parametern innerhalb des Grundstücks Code in ggplot hinzufügen? So ähnlich?
fun1 <- function(x) x^2 + a*b
p <- ggplot(data = data.frame(x = 0), mapping = aes(x = x))
p + stat_function(fun = fun1, par=list(a=1, b=2)) + xlim(-5,5)
Genau! Vielen Dank! – Juanchi