plot.sf: Plot simple features simply

Description Usage Arguments Details Value Examples

Description

Overrides 'sf::plot.sf' and wraps the call to 'plot(st_geometry(x))'.

Usage

1
2
## S3 method for class 'sf'
plot(x, ...)

Arguments

x

sf object (the data.frame one)

...

arguments passed to [sf::plot_sfc]

Details

This can be used when developing code or checking things, so that plots aren't always faceted by all attributes, coloured by them, or leaving the plot unusable for subsequent additional drawing.

Value

used for its side effects

Examples

1
2
3
4
nc <- read_sf(system.file("shape/nc.shp", package="sf"))
## all we've changed is the plot command
plot(nc)
plot(nc[sample(1:nrow(nc), 10), ], col = rainbow(10), add = TRUE)

mdsumner/basf documentation built on May 23, 2019, 1:10 p.m.