Description Usage Arguments Value Author(s) See Also Examples
A function that creates a plot of points on a background map pulled from Google Maps' API.
1 |
latitude |
the latitude coordinates of points in the plot. |
longitude |
the longitude coordinates of points in the plot |
e |
the extent for the map. If not given, the function will determine an extent from the points that were provided. |
scaleby |
the variable for bubbles to be scaled by in a bubble plot. |
size |
Allows the user to shrink or expand the size of the plotted points as a percent of the default points size. For example, size = 80 would display points that are 80 |
col |
a specification for the plotting color. Defaults to "blue". You can provide any color name here, like "red", "purple", etc., in quotes. Or, you could use hex values like "FF00FF", again in quotes. See section 'Color Specification' in the |
pch |
either an integer specifying a symbol or a single character to be used as the default in plotting points. The default is 20, which corresponds to filled-in circles, but you could use any number between 1 and 25. See |
add |
a logical value specifying whether you want to add the plot you are creating to the previous one you created (for example, if plotting a different subset in a separate color to be displayed on the same map). Defaults to FALSE. |
... |
graphical parameters to be passed to |
Produces a map.
Amelia McNamara, James Molyneux
1 2 3 4 5 6 7 8 9 10 | lat <- runif(10, 32, 42)
lon <- runif(10, -124, -114)
scale <- sample(1:10, 10)
type <- as.factor(sample(c("a","b","c"), size = 10, replace = TRUE))
MakeMap(lat, lon)
MakeMap(lat, lon, scaleby = scale)
MakeMap(lat, lon, scaleby = scale, size = 50) # shrink bubbles by 50%
MakeMap(lat, lon, scaleby = scale, size = 150) # expand bubbles by 50%
MakeMap(lat, lon, col = type)
MakeMap(lat, lon, scaleby = scale, col = type)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.