Plot.PP {MVar}R Documentation

Graphics of the Projection Pursuit (PP).

Description

Graphics of the Projection Pursuit (PP).

Usage

Plot.PP(PP, titles = NA, xlabel = NA, ylabel = NA, posleg = 2, 
        boxleg = TRUE, size = 1.1, grid = TRUE, color = TRUE, linlab = NA,  
        axesvar = TRUE, axes = TRUE, casc = TRUE)

Arguments

PP

Data of the PP_Optimizer function.

titles

Titles of the graphics, if not set, assumes the default text.

xlabel

Names the X axis, if not set, assumes the default text.

ylabel

Names the Y axis, if not set, assumes the default text.

posleg

0 with no caption,
1 for caption in the left upper corner,
2 for caption in the right upper corner (default),
3 for caption in the right lower corner,
4 for caption in the left lower corner.

boxleg

Puts the frame in the caption (default = TRUE).

size

Size of the points in the graphs.

grid

Put grid on graphs (default = TRUE).

color

Colored graphics (default = TRUE).

linlab

Vector with the labels for the observations.

axesvar

Puts axes of rotation of the variables, only when dimproj > 1 (default = TRUE).

axes

Plots the X and Y axes (default = TRUE).

casc

Cascade effect in the presentation of the graphics (default = TRUE).

Value

Graph of the evolution of the indices, and graphs whose data were reduced in two dimensions.

Author(s)

Paulo Cesar Ossani

Marcelo Angelo Cirillo

See Also

PP_Optimizer and PP_Index

Examples

data(iris) # dataset

# Example 1 - Without the classes in the data
data <- iris[,1:4]

Fcindex <- "kurtosismax" # index function

Dim <- 1 # dimension of data projection

sphere <- TRUE # spherical data

Res <- PP_Optimizer(data = data, class = NA, findex = Fcindex,
                    optmethod = "GTSA", dimproj = Dim, sphere = sphere, 
                    weight = TRUE, lambda = 0.1, r = 1, cooling = 0.9, 
                    eps = 1e-3, maxiter = 500, half = 30)

Plot.PP(Res, titles = NA, posleg = 1, boxleg = FALSE, color = TRUE,
        linlab = NA, axesvar = TRUE, axes = TRUE, casc = FALSE)


# Example 2 - With the classes in the data
class <- iris[,5] # data class

Res <- PP_Optimizer(data = data, class = class, findex = Fcindex,
                    optmethod = "GTSA", dimproj = Dim, sphere = sphere, 
                    weight = TRUE, lambda = 0.1, r = 1, cooling = 0.9, 
                    eps = 1e-3, maxiter = 500, half = 30)

Tit <- c(NA,"Graph example") # titles for the graphics

Plot.PP(Res, titles = Tit, posleg = 1, boxleg = FALSE, color = TRUE,
        linlab = NA, axesvar = TRUE, axes = TRUE, casc = FALSE)


# Example 3 - Without the classes in the data, but informing 
#             the classes in the plot function
Res <- PP_Optimizer(data = data, class = NA, findex = "Moment",
                    optmethod = "GTSA", dimproj = 2, sphere = sphere, 
                    weight = TRUE, lambda = 0.1, r = 1, cooling = 0.9, 
                    eps = 1e-3, maxiter = 500, half = 30)

Lin <- c(rep("a",50),rep("b",50),rep("c",50)) # data class

Plot.PP(Res, titles = NA, posleg = 1, boxleg = FALSE, color = TRUE,
        linlab = Lin, axesvar = TRUE, axes = TRUE, casc = FALSE)


# Example 4 - With the classes in the data, but not informed in plot function
class <- iris[,5] # data class

Dim <- 2 # dimension of data projection

Fcindex <- "lda" # index function

Res <- PP_Optimizer(data = data, class = class, findex = Fcindex,
                    optmethod = "GTSA", dimproj = Dim, sphere = sphere, 
                    weight = TRUE, lambda = 0.1, r = 1, cooling = 0.9, 
                    eps = 1e-3, maxiter = 500, half = 30)

Tit <- c("",NA) # titles for the graphics

Plot.PP(Res, titles = Tit, posleg = 1, boxleg = FALSE, color = TRUE,
        linlab = NA, axesvar = TRUE, axes = TRUE, casc = FALSE)


[Package MVar version 2.0.9 Index]