make_basemap: make_basemap

Description Usage Arguments Value See Also

Description

This function creates a simple basemap on which to plot data. The plot consists of a (filled) coastline, with a labelled lat-lon grid. When a dataframe is provided, the extents of the plot will automatically match the extent of the supplied data (with a 15 percent buffer around the edges). Additionally, the output projection of the plot can be specified (e.g. "+init=epsg:2220" would result in UTM Zone 20 N, while "+init=epsg:4326" would be an unprojected WGS84 plot. Many values are possible and/or appropriate for the value of crs.out, depending on the data. Check CRS-class for more options.

Usage

1
2
3
make_basemap(df = NULL, lat.field = "LATITUDE", lon.field = "LONGITUDE",
  crs.out = "+init=epsg:2220", x.limits = c(-70, -54), y.limits = c(41,
  50))

Arguments

df

default is NULL. You can optionally send a dataframe with values for LATITUDE and LONGITUDE to this function, which can be have the plot extent match the data.

lat.field

default is LATITUDE. The field in the dataframe holding the latitudes

lon.field

default is LONGITUDE. The field in the dataframe holding the longitudes

crs.out

default is '+init=epsg:2220' (UTM Zone 20 N). This is the desired projection of the final plot.

x.limits

default is c(-70, -54) but an appropriate value would be in the form of c(-70,-54). These are the default bounding longitudes.

y.limits

default is c(41, 50) but an appropriate value would be in the form of is c(41,50). These are the default bounding latitudes for extent.

Value

a SpatialPolygons object corresponding to the bounding box of the plot.

See Also

Other plotting: add_points, df_qc_spatial


Maritimes/bio.plotting documentation built on May 28, 2019, 8:22 a.m.