.plotGrob | R Documentation |
Internal function. Plot a raster Grob, a points Grob, polygon Grob.
.plotGrob(
grobToPlot,
col = NULL,
real = FALSE,
size = unit(5, "points"),
minv,
maxv,
legend = TRUE,
legendText = NULL,
length = NULL,
gp = gpar(),
gpText = gpar(),
pch = 19,
speedup = 1,
name = character(),
vp = list(),
...,
verbose = getOption("quickPlot.verbose")
)
grobToPlot |
|
col |
Currently only used for the legend of a |
real |
Logical indicating whether the data are |
size |
The size of the |
minv |
The minimum value on a |
maxv |
The maximum value on a |
legend |
Logical indicating whether a legend should be drawn.
Default |
legendText |
Vector of values to use for legend value labels.
Defaults to |
length |
Numeric. |
gp |
|
gpText |
|
pch |
Point character for |
speedup |
Numeric. The factor by which the number of vertices in
|
name |
Character string of name of object being plotted. |
vp |
whole viewport tree of |
... |
Additional arguments. None currently implemented. |
verbose |
Numeric or logical. If |
speedup
is only used for SpatialPolygons
, SpatialPoints
,
and SpatialLines
in this function.
Attempts have been made to subsample at a good level that optimizes speed of
plotting, without losing visible quality. Nevertheless, to force all points to
be plotted, use a speedup value less than 0.1.
From a speed perspective, there appears to be an optimal subsampling when
using thin
from the fastshp package.
Presumably, too much thinning requires large distance matrices to be
calculated, slowing plotting down.
Too little thinning causes an overabundance of points to be plotted, slowing
plotting down.
The suggested package fastshp
can be installed with:
install.packages("fastshp", repos = "https://rforge.net", type = "source")
or
for binary install.packages("fastshp", repos = "https://PredictiveEcology.r-universe.dev")
NOTE: you may get errors relating to not having installed the software tools
required for building R packages on your system.
For building on Windows, you'll need to install Rtools
from
https://cran.r-project.org/bin/windows/Rtools/.
Eliot McIntire
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.