plot.minima:

Usage Arguments Examples

View source: R/metadynminer.R

Usage

1
plot.minima(minims, plottype = "both", xlim = NULL, ylim = NULL, zlim = NULL, main = NULL, sub = NULL, xlab = NULL, ylab = NULL, nlevels = 10, levels = NULL, col = rainbow(135)[100:1], labels = NULL, labcex = 0.6, drawlabels = TRUE, method = "flattest", textcol = "black", pch = 1, bg = "red", cex = 1, contcol = par("fg"), lty = par("lty"), lwd = par("lwd"), axes = T)

Arguments

minims
plottype
xlim
ylim
zlim
main
sub
xlab
ylab
nlevels
levels
col
labels
labcex
drawlabels
method
textcol
pch
bg
cex
contcol
lty
lwd
axes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (minims, plottype = "both", xlim = NULL, ylim = NULL, 
    zlim = NULL, main = NULL, sub = NULL, xlab = NULL, ylab = NULL, 
    nlevels = 10, levels = NULL, col = rainbow(135)[100:1], labels = NULL, 
    labcex = 0.6, drawlabels = TRUE, method = "flattest", textcol = "black", 
    pch = 1, bg = "red", cex = 1, contcol = par("fg"), lty = par("lty"), 
    lwd = par("lwd"), axes = T) 
{
    fes <- minims$fes
    rows <- minims$rows
    minpoints <- minims$minima[, 4:5]
    minlabs <- minims$minima[, 1]
    if (minims$dimension == 1) {
        x <- minims$x
        if (is.null(xlab)) 
            xlab = "CV"
        if (is.null(ylab)) 
            ylab = "free energy"
        if (is.null(xlim)) 
            xlim <- c(min(x), max(x))
        if (is.null(ylim)) {
            ylim <- range(pretty(range(fes)))
        }
        plot(x, fes, type = "l", col = col, xlim = xlim, ylim = ylim, 
            xlab = xlab, ylab = ylab, axes = axes, main = main, 
            sub = sub)
    }
    else {
        x <- minims$x
        y <- minims$y
        if (is.null(xlab)) 
            xlab = "CV1"
        if (is.null(ylab)) 
            ylab = "CV2"
        if (is.null(zlim)) {
            zlim <- range(pretty(range(fes)))
        }
        if (is.null(levels)) {
            levels <- pretty(zlim, nlevels)
        }
        if (is.null(xlim)) 
            xlim <- c(min(x), max(x))
        if (is.null(ylim)) 
            ylim <- c(min(y), max(y))
        if (plottype == "points") {
            text(minpoints, labels = minlabs, col = textcol, 
                xlim = xlim, ylim = ylim, xlab = xlab, ylab = ylab, 
                axes = axes, pch = pch, bg = bg, cex = cex, main = main, 
                sub = sub)
        }
        if (plottype == "image" || plottype == "both") {
            image(x, y, fes, zlim = zlim, col = col, xlim = xlim, 
                ylim = ylim, xlab = xlab, ylab = ylab, axes = axes, 
                main = main, sub = sub)
            text(minpoints, labels = minlabs, col = textcol, 
                xlim = xlim, ylim = ylim, xlab = xlab, ylab = ylab, 
                pch = pch, bg = bg, cex = cex, main = main, sub = sub)
        }
        if (plottype == "contour") {
            contour(x, y, fes, zlim = zlim, nlevels = nlevels, 
                levels = levels, labels = labels, labcex = labcex, 
                drawlabels = drawlabels, method = method, col = contcol, 
                lty = lty, lwd = lwd, main = main, sub = sub)
            text(minpoints, labels = minlabs, col = textcol, 
                xlim = xlim, ylim = ylim, xlab = xlab, ylab = ylab, 
                pch = pch, bg = bg, cex = cex, main = main, sub = sub)
        }
        if (plottype == "both") {
            contour(x, y, fes, zlim = zlim, nlevels = nlevels, 
                levels = levels, labels = labels, labcex = labcex, 
                drawlabels = drawlabels, method = method, col = contcol, 
                lty = lty, lwd = lwd, add = T)
        }
    }
  }

sucurz/testing documentation built on May 29, 2019, 9:51 a.m.