PlotBubble: Create a Bubble Plot of Spatial Data

Description Usage Arguments Value Author(s) See Also Examples

View source: R/PlotBubble.R

Description

Bubble plot for spatial data with attributes. This is a wrapper around bubble in the sp package.

Usage

1
2
3
PlotBubble(pts, zcol, ply, xlim = bbox(ply)[1, ], ylim = bbox(ply)[2, ],
           main = "", gr.type = "windows", gr.file = NULL,
           projargs = proj4string(pts))

Arguments

pts

SpatialPointsDataFrame; the data at the observation sites.

zcol

character; the z-variable column name in attribute table of pts.

ply

SpatialPolygonsDataFrame; a polygon to include in layout.

xlim

numeric; a vector of length 2 giving left and right limits for the x-axis.

ylim

numeric; a vector of length 2 giving lower and upper limits for the y-axis.

main

character; the main plot title to be placed on top.

gr.type

character; the name of a graphics driver, either "postscript", "pdf", "png", or the default "windows".

gr.file

character; the path of a file for writing the graphics, only used if gr.type is not "windows".

projargs

character; the projection arguments; the arguments must be entered exactly as in the PROJ.4 documentation.

Value

Returns (or plots) the bubble plot. Values plotted in the key include the five quantiles: minimum, 25th percentile, median, 75th percentile, and maximum.

Author(s)

J.C. Fisher

See Also

bubble, OpenGraphicsDevice

Examples

1
2
3
4
5
6
7
8
9
data(ESRP_NWIS)
data(ESRP_Boundary)
data(ESRP_NED)

PlotBubble(ESRP_NWIS, "var1.acy", ESRP_Boundary,
           main = "Measurment error")
PlotBubble(ESRP_NWIS, "var1.sd", ESRP_Boundary,
           xlim = c(178000, 257500), ylim = c(202000, 272000),
           main = "Standard deviation", projargs = proj4string(ESRP_NED))

jfisher-usgs/ObsNetwork documentation built on Jan. 3, 2020, 4:35 p.m.