plot.motbf | R Documentation |
'motbf'
objectsDraws an 'motbf'
function.
## S3 method for class 'motbf' plot(x, xlim = 0:1, ylim = NULL, type = "l", ...)
x |
An object of class |
xlim |
The range to be encompassed by the x axis; by default |
ylim |
The range of the y axix. |
type |
As for plot. |
... |
Further arguments to be passed as for plot. |
A plot of the specificated function.
## 1. EXAMPLE ## Data X <- rexp(2000) ## Learning f1 <- univMoTBF(X, POTENTIAL_TYPE = "MOP"); f1 f2 <- univMoTBF(X, POTENTIAL_TYPE = "MTE", maxParam = 10); f2 f3 <- univMoTBF(X, POTENTIAL_TYPE = "MOP", nparam=10); f3 ## Plots plot(NULL, xlim = range(X), ylim = c(0,0.8), xlab="X", ylab="density") plot(f1, xlim = range(X), col = 1, add = TRUE) plot(f2, xlim = range(X), col = 2, add = TRUE) plot(f3, xlim = range(X), col = 3, add = TRUE) hist(X, prob = TRUE, add= TRUE) ## 2. EXAMPLE ## Data X <- c(rnorm(2000, mean = -3),rnorm(2000, mean = 3)) ## Learning f1 <- univMoTBF(X, POTENTIAL_TYPE = "MOP"); f1 f2 <- univMoTBF(X, POTENTIAL_TYPE = "MTE"); f2 ## Plots plot(NULL, xlim = range(X), ylim = c(0,0.20), xlab="X", ylab="density") plot(f1, xlim = range(X), col = 2, add = TRUE) plot(f2, xlim = range(X), col = 4, add = TRUE) hist(X, prob = TRUE, add= TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.