These methods provide various 2D and 3D plots for objects of class "homals"
.
# S3 method for homals
plot(x, plot.dim = c(1, 2), plot.type = "loadplot", var.subset, main,
type, xlab, ylab, xlim, ylim, leg.pos = "topright", identify = FALSE, ...)# S3 method for homals
plot3dstatic(x, plot.dim = c(1, 2, 3), plot.type = "jointplot", var.subset, main, type,
xlab, ylab, zlab, xlim, ylim, zlim, ...)
Object of class "homals"
Vector with dimensions to be plotted against.
String indicating which type of plot to be produced: "jointplot"
, "catplot"
"labplot"
, "objplot"
, "starplot"
, "graphplot"
, "hullplot"
,
"lossplot"
, "prjplot"
, "spanplot"
, , "trfplot"
, "vecplot"
,
"vorplot"
, "loadplot"
, "screeplot"
, "dmplot"
(Not all of these are provided as 3d-plots, see below).
Numeric vector for subsetting variables to be plotted. If missing, all variables are taken into account. Ignored for non separate variable plots.
Plot title.
Type of points/lines to be plotted.
Label of x-axis.
Label of y-axis.
Label of z-axis.
Limits for x-axis.
Limits for y-axis.
Limits for z-axis.
Position of the legend (for "trfplot"
and "spanplot"
only)
as provided in legend
.
If TRUE
, interactive plots are provided.
Further plot arguments passed: see plot
, plot3d
in package rgl
, and scatterplot3d
in package scatterplot3d
for detailed information.
Plot description:
- Object plot (plot.type = "objplot"
): Plots the scores of the objects (rows in data set) on two or
three dimensions.
- Category plot (plot.type = "catplot"
): Plots the rank-restricted category quantifications for each
variable separately. Three-dimensional plot is available.
- Voronoi plot (plot.type = "vorplot"
): Produces a category plot with Voronoi regions.
- Joint plot (plot.type = "jointplot"
): Plots the object scores and the category quantifications in 1 device.
Three-dimensional version is available.
- Graph plot (plot.type = "graphplot"
): Joint plot with connections between scores/quantifications.
- Hull plot (plot.type = "hullplot"
): For each single variable the object scores are mapped onto two
dimensions and the convex hull for each response category is drawn.
- Label plot (plot.type = "labplot"
): Similar to object plot, the object scores are plotted but for
each variable separately with the corresponding category labels. A three-dimensional
version is provided.
- Span plot (plot.type = "spanplot"
): As label plot, it maps the object scores for each variable and
span plot connects them by the shortest path within each response category.
- Star plot (plot.type = "starplot"
): Again, the object scores are mapped. In addition these points
are connected with the category centroid. Three-dimensional version is provided.
- Loss plot (plot.type = "lossplot"
): Plots the rank-restricted category quantifications against the
unrestricted for each variable separately.
- Projection plot (plot.type = "prjplot"
): For variables of rank 1 the object scores (two-dimensional)
are projected onto a straight line determined by the rank restricted category quantifications.
- Vector plot (plot.type = "vecplot"
): For variable of rank 1 the object scores (two-dimensional) are
projected onto a straight line determined by the rank restricted category quantifications.
- Transformation plot (plot.type = "trfplot"
): Plots the original (categorical) scale against the
transformed (metric) scale on each dimension over the categories of each variable separately.
- Loadings plot (plot.type = "loadplot"
): Plots the loadings of the variables and connects them with the origin. Three-dimensional version is available.
- Scree plot (plot.type = "screeplot"
): Produces a scree plot based on the eigenvalues.
- Discrimination measures (plot.type = "dmplot"
): Plots the discrimination measures for each variable.
# NOT RUN {
##Graphplot for Hartigan solution: 3 dimensions extracted, dimension 1 plotted
##against dimension 3.
data(hartigan)
res <- homals(hartigan, ndim = 3)
plot(res, plot.dim = c(1,3), plot.type = "graphplot")
# }
Run the code above in your browser using DataLab