geo_grob: Create graphical objects

Description Usage Arguments Value Examples

View source: R/geo-grob.R

Description

Create graphical objects

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
geo_grob(
  x,
  ...,
  rule = "evenodd",
  default.units = "native",
  name = NULL,
  vp = NULL
)

## Default S3 method:
geo_grob(
  x,
  ...,
  rule = "evenodd",
  default.units = "native",
  name = NULL,
  vp = NULL
)

## S3 method for class 'wk_wkt'
geo_grob(
  x,
  ...,
  rule = "evenodd",
  default.units = "native",
  name = NULL,
  vp = NULL
)

## S3 method for class 'wk_wkb'
geo_grob(
  x,
  ...,
  rule = "evenodd",
  default.units = "native",
  name = NULL,
  vp = NULL
)

## S3 method for class 'wk_wksxp'
geo_grob(
  x,
  ...,
  rule = "evenodd",
  default.units = "native",
  name = NULL,
  vp = NULL
)

## S3 method for class 'geovctrs_xy'
geo_grob(
  x,
  ...,
  rule = "evenodd",
  default.units = "native",
  name = NULL,
  vp = NULL
)

## S3 method for class 'geovctrs_segment'
geo_grob(
  x,
  ...,
  rule = "evenodd",
  default.units = "native",
  name = NULL,
  vp = NULL
)

## S3 method for class 'geovctrs_rect'
geo_grob(
  x,
  ...,
  rule = "evenodd",
  default.units = "native",
  name = NULL,
  vp = NULL
)

Arguments

x

A geometry-like object, or one that can be coerced to a geometry-like object using as_geovctr().

...

Graphical parameters passed to grid::gpar(). These are recycled along the input. Dynamic dots (e.g., !!!) are supported.

rule

Use "winding" if polygon rings are correctly encoded with a winding direction.

default.units

Coordinate units, which may be defined by the viewport (see grid::unit()). Defaults to native.

name

Passed to grid::pointsGrob(), grid::polylineGrob(), grid::pathGrob(), or grid::gTree() depending on the types of geometries in the input.

vp

Passed to grid::pointsGrob(), grid::polylineGrob(), grid::pathGrob(), or grid::gTree() depending on the types of geometries in the input.

Value

A grid graphical object

Examples

1
2
3
4
grid::grid.newpage()
grid::grid.draw(
  geo_grob("POINT (0.5 0.5)", col = "red", pch = 16, default.units = "npc")
)

paleolimbot/geovctrs documentation built on July 30, 2020, 3:41 p.m.