Learn R Programming

SpatialPosition (version 2.1.2)

plotReilly: Plot a Reilly Raster

Description

This function plots the raster produced by the rasterReilly function.

Usage

plotReilly(x, add = FALSE, col = rainbow)

Arguments

x

raster; output of the rasterReilly function.

add

logical; if TRUE the raster is added to the current plot, if FALSE the raster is displayed in a new plot.

col

function; color ramp function, such as colorRampPalette.

Details

Display the raster nicely.

See Also

reilly, rasterReilly.

Examples

Run this code
data(hospital)
# Compute Reilly catchment areas from known points (hospital) on a
# grid defined by its resolution
myreilly <- reilly(knownpts = hospital, varname = "capacity",
                   typefct = "exponential", span = 1250, beta = 3,
                   resolution = 200, mask = paris, returnclass = 'sf')
# Create a raster of reilly values
myreillyraster <- rasterReilly(x = myreilly, mask = paris)
# Plot the raster nicely
plotReilly(x = myreillyraster)

Run the code above in your browser using DataLab