parallelMaps | R Documentation |
This function takes a data.frame
of coordinates and uses a 'group'
column to make a plot placing the points in a parallel way.
parallelMaps(
x,
overlay = 0,
direction = 2,
labels.args = list(),
map.args = list(),
final.par = list(),
saveFig = FALSE,
png.args = list(),
extra.args = list(res = 450, width = 2000),
xlim = NULL,
ylim = NULL,
col = "black",
pch = 1,
cex = 1,
interpolate = FALSE,
show.axis.labels = TRUE,
pos.axis.labels = ifelse(direction%%2 == 0, 2, 1),
axis.labels.args = list(),
quiet = FALSE,
extra.elements.bf = NULL,
extra.elements.af = NULL,
...
)
x |
|
overlay |
|
direction |
|
labels.args |
Extra arguments for mtext that is used to
specify the labels of groups. If |
map.args |
Extra arguments for map that is used to add map
shapes to subplots. If |
final.par |
|
saveFig |
|
png.args |
|
extra.args |
Extra arguments passed to some internal steps. See Details. |
xlim , ylim |
|
col , pch , cex |
Features that will vary by groups. |
interpolate |
a |
show.axis.labels |
|
pos.axis.labels |
If |
axis.labels.args |
If |
quiet |
|
extra.elements.bf , extra.elements.af |
Adicional elements could be
included in the subplots (by group) by this argument: |
... |
Extra arguments passed to plot that makes subplots. |
x
must be defined as a data.frame
with at least 3 columns: lon,
lat and group. It is recommended that to define group as a factor,
otherwise, it will be defined internaly as it using as.factor.
This function plots and saves internaly one figure per group. The quality of
this subplots can be modified by extra.args
setting res
(default 200) and width
in pixels (default 2500).
extra.elements.bf
and extra.elements.af
receive pieces of code
that will be placed and run before or after the drawing of points. The order
of drawing is an empty canvas, the extra.elements.bf
-elements, the
points, the map, the labels of groups, and the
extra.elements.af
-elements.
Depending on saveFig
and plot
values, this function
will return a plot
data(coord_example)
parallelMaps(x = coord_example, direction = 2, overlay = 0.1,
xlim = c(-82, -74), ylim = c(-16, -4),
labels.args = list(adj = 0.5, side = 1),
col = adjustcolor(c("blue", "red", "forestgreen", "gold2"), 0.5),
pch = c(15, 16, 17, 18),
map.args = list(database = "worldHires"),
extra.elements.bf = {
abline(h = -6, col = "purple")
abline(h = -14, col = "gold4")})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.