View source: R/CreateFactorMaps4CA.R
createFactorMapIJ | R Documentation |
createFactorMapIJ
: Creates
ggplot2
factorial maps for dots and labels.
NB needs a base map to work correctly.
createFactorMapIJ( Fi, Fj, axis1 = 1, axis2 = 2, constraints = NULL, title = NULL, col.points.i = "blueviolet", alpha.points.i = 0.5, pch.i = 19, cex.i = 2.5, segment.size.i = 0, col.labels.i = "darkorchid4", alpha.labels.i = 1, text.cex.i = 4, font.face.i = "bold", font.family.i = "sans", force.i = 1, col.points.j = "darkolivegreen4", alpha.points.j = 0.5, pch.j = 18, cex.j = 2.5, segment.size.j = 0, col.labels.j = "darkolivegreen", alpha.labels.j = 0.5, text.cex.j = 4, font.face.j = "bold", font.family.j = "sans", force.j = 1, col.axes = "darkorchid", alpha.axes = 0.2, width.axes = 1.1, col.background = adjustcolor("lavender", alpha.f = 0.2), nudge_x = 0, nudge_y = 0, ... )
Fi |
the I-set factor scores to plot |
Fj |
the J-set factor scores to plot |
axis1 |
the column of X used for the horizontal axis of the plot. Default 1. |
axis2 |
the column of X used for the vertical axis of the plot. Default 2. |
constraints |
a list with minx miny maxx maxy
typically obtained from |
title |
a title for the plots. |
col.points.i |
the color of the points/dots for the I-set.
Can be one color or a vector of colors. If a vector it needs
to have exactly the number of items to be plotted.
Default = |
alpha.points.i |
(default = .5), the alpha (transparency) for the points, should be between 1 (no transparency) and 0 (completely transparent). |
pch.i |
the character for the points for the I-set. Default is 19 (Circles). |
cex.i |
size of the dots for the I-set. Default = 2.5 |
segment.size.i |
= 0, # size of segment |
col.labels.i |
the color of the labels for
the I-set.
Can be one color or a vector of colors. If a vector, it needs
to have exactly the number of items to be plotted.
Default = |
alpha.labels.i |
(default = 1), the alpha (transparency) for the I-labels, should be between 1 (no transparency) and 0 (completely transparent). |
text.cex.i |
= 4, font size for labels for the I-set. |
font.face.i |
(Default = |
font.family.i |
(Default = |
force.i |
(Default = 1). How much ggrepel repels the labels for the I-set. |
col.points.j |
the color of the points/dots
for the J-set.
Can be one color or a vector of colors. If a vector it needs
to have exactly the number of items to be plotted.
Default = |
alpha.points.j |
(default = .5), the alpha (transparency) for the points, should be between 1 (no transparency) and 0 (completely transparent). |
pch.j |
the character for the points for the |
cex.j |
size of the dots for the J-set. Default = 2.5 |
segment.size.j |
= 0, # size of segment for J-set |
col.labels.j |
the color of the labels for
the J-set.
Can be one color or a vector of colors. If a vector, it needs
to have exactly the number of items to be plotted.
Default = |
alpha.labels.j |
(default = 1), the alpha (transparency) for the J-labels, should be between 1 (no transparency) and 0 (completely transparent). |
text.cex.j |
(Default = 4), font size for labels for the J-set. |
font.face.j |
(Default = |
font.family.j |
(Default = |
force.j |
= 1. How much ggrepel repels the labels for the J-set. |
col.axes |
(Default = |
alpha.axes |
(Default = .2) transoarency factors for the color of the axes. |
width.axes |
(Default = 1.1) the width of the axes |
col.background |
[Default =
|
nudge_x |
= 0. From |
nudge_y |
= 0. From |
... |
everything else for the functions |
a list with
1) zeMap:
The Complete Map (background Dots and Labels);
2) zeMap_background:
The background;
3) zeMap_dots:
The dots;
4) zeMap_text:
The labels;
5) factorScores
: The factor scores; and
6) constraints:
The list of the contraints.
When creating multiple layers graphs,
because of the way ggplot2
creates graphs, all the
the matrices/dataframe should all the have the same column names
[e.g., colnames()
equal to c("Dimension 1", "Dimension 2")].
When it is not the case, some strange and cryptic
error may be produced
(e.g., "cannot find Dimension").
Herve Abdi
createFactorMaps createbaseMap
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.