Learn R Programming

geos (version 0.2.4)

plot.geos_geometry: Plot GEOS geometries

Description

Plot GEOS geometries

Usage

# S3 method for geos_geometry
plot(
  x,
  ...,
  asp = 1,
  bbox = NULL,
  xlab = "",
  ylab = "",
  rule = "evenodd",
  add = FALSE,
  simplify = 1,
  crop = TRUE
)

Value

The input, invisibly

Arguments

x

A GEOS geometry vector

...

Passed to plotting functions for features: graphics::points() for point and multipoint geometries, graphics::lines() for linestring and multilinestring geometries, and graphics::polypath() for polygon and multipolygon geometries.

asp, xlab, ylab

Passed to graphics::plot()

bbox

The limits of the plot as a rct() or compatible object

rule

The rule to use for filling polygons (see graphics::polypath())

add

Should a new plot be created, or should handleable be added to the existing plot?

simplify

A relative tolerance to use for simplification of geometries. Use 0 to disable simplification; use a higher number to make simplification coarser.

crop

Use TRUE to crop the input to the extent of the plot.

Examples

Run this code
plot(as_geos_geometry("LINESTRING (0 0, 1 1)"))
plot(as_geos_geometry("POINT (0.5 0.4)"), add = TRUE)

Run the code above in your browser using DataLab