rangemap_plot generates customizable figures of species range maps using objects produced by other functions of this package.
rangemap_plot(sp_range, polygons, add_EOO = FALSE, add_occurrences = FALSE,
basemap_color = "gray93", range_color = "darkgreen",
extent_color = "blue", occurrences_color = "yellow",
grid = FALSE, grid_sides = "bottomleft", ylabels_position = 1.3,
legend = FALSE, legend_position = "bottomright",
northarrow = FALSE, northarrow_position = "topright",
scalebar = FALSE, scalebar_position = "bottomleft",
scalebar_length = 100, zoom = 1)a sp_range object produced with any of the following functions:
rangemap_buffer, rangemap_boundaries,
rangemap_hull, rangemap_enm, and
rangemap_tsa.
(optional) a SpatialPolygons* object to be used as base for
the map. If NULL, a simplified world map will be used.
(logical) if TRUE, the extent of occurrence of the
species will be added to the figure. Ignored if the sp_range is product
of the rangemap_boundaries function and administrative areas were
selected only based on names. Default = FALSE.
(logical) if TRUE, the species occurrence records
will be added to the figure. Ignored if the sp_range is product of the
rangemap_boundaries function and administrative areas were selected
only based on names. Default = FALSE.
color for the basemap (polygons) to be plotted.
Default = "gray93".
color for the species sp_range to be plotted.
Default = "darkgreen".
color for the species extent of occurrence to be plotted. Default = "blue".
color for the species occurrences to be plotted.
Default = "yellow".
(logical) if TRUE, labels and grid division ticks will be
inserted in grid_sides. Default = FALSE.
(character) sides in which the labels will be placed in the figure. Options are the same than for other position character indicators (see details). Default = "bottomleft".
(numeric) if grid = TRUE, separation
(in lines) of y axis labels from the axis. Bigger numbers will increase
separation. Default = 1.3.
(logical) if TRUE, a legend of the plotted features will
be added to the figure at legend_position. Default = FALSE.
(numeric or character) site in the figure where the legend will be placed. If numeric, vector of length two indicating x and y coordinates to be used to position the legend. See details for options of character indicators of position. Default = "bottomright".
(logical) if TRUE, a simple north arrow will be placed
in northarrow_position. Default = FALSE.
(numeric or character) site in the figure where the north legend will be placed. If numeric, vector of length two indicating x and y coordinates to be used to position the north arrow. See details for options of character indicators of position. Default = "topright".
(logical) if TRUE, a simple scale bar will be inserted
in the figure at scalebar_position with a length of scalebar_length.
Default = FALSE.
(numeric or character) site in the figure where the scale bar will be placed. If numeric, vector of length two indicating x and y coordinates to be used to position the scale bar. See details for options of character indicators of position. Default = "bottomleft".
(numeric) length of the scale bar in km. Using entire numbers divisible for two is recommended. Default = 100.
(numeric) zoom factor when plotting the species range in a map. Default = 1. Larger values will zoom in into the species range and smaller values will zoom out. A value of 0.5 will duplicate the area that the biggest range is covering.
A plot of the species range in a geographic context, with some map components defined by the user.
Position of distinct elements depend on the spatial configuration of the species range. Therefore, their position may need to be changed if the elements are needed. Position options are: "bottomright", "bottomleft", "topleft", and "topright". Numerical descriptions of positions are also allowed.
# NOT RUN {
# example data
data("cvehull_range", package = "rangemap")
# arguments for the species range figure
extent <- TRUE
occ <- TRUE
legend <- TRUE
# creating the species range figure
rangemap_plot(cvehull_range, add_EOO = extent, add_occurrences = occ,
legend = legend)
# }
Run the code above in your browser using DataLab