Description Usage Arguments Value Author(s) See Also
This function adds points to an existing plot. The advantage over points(...)
is that by including a map object as
input, it will automatically reproject the points, and trim them such that only positions that fall within the map boundaries are shown.
The user is notified of how many positions lay outside of the map boundaries.
Additionally, the input data can either be symbolized generically (i.e. one style), or if a bin.style
is elected, data will be
symbolized according to the values of an identified field. Both the colour and size of the points can vary with the values in plot.field
.
1 2 3 4 5 6 7 8 | add_points(df, basemap = NULL, lat.field = "LATITUDE",
lon.field = "LONGITUDE", plot.field = NULL, plot.field.pretty = NULL,
pnt.style = 21, pnt.fill = "#1874CD", pnt.outline = "#333333",
pnt.cex.min = 1, pnt.cex.max = 2, show.legend = TRUE,
leg.pos = "topleft", colour.ramp = c("#edf8b1", "#7fcdbb", "#2c7fb8"),
size.ramp = TRUE, bin.style = "fixed", fixed.breaks.bins = c(1, 4, 32,
256, 2045, 16336, 130496, 1042432, 8327186), trim.fixed.breaks = TRUE,
trim.legend = TRUE, nbins = 3, save.plot = FALSE)
|
df |
the dataframe to be plotted |
basemap |
a SpatialPolygons object (identifying the boundaries and projection of an existing plot). If none is provided, a default |
lat.field |
the default is |
lon.field |
the default is |
plot.field |
the default is |
plot.field.pretty |
the default is |
pnt.style |
the default is |
pnt.fill |
the default is |
pnt.outline |
the default is |
pnt.cex.min |
the default is |
pnt.cex.max |
the default is |
show.legend |
the default is |
leg.pos |
the default is |
colour.ramp |
the default is |
size.ramp |
the default is |
bin.style |
the default is |
fixed.breaks.bins |
the default is |
trim.fixed.breaks |
the default is |
trim.legend |
the default is |
nbins |
the default is |
save.plot |
the default is |
a SpatialPolygons object (identifying the boundaries and projection of an existing plot). It also notifies the user of how many positions lay outside of the map boundaries.
Mike McMahon, Mike.McMahon@dfo-mpo.gc.ca
Other plotting: df_qc_spatial
,
make_basemap
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.