The viz_rhumbs function draws rhumb lines (loxodromes),
similar to those found on old portolan charts. These lines represent paths of constant bearing.
Arguments
- map
A
geovizmap created withviz_create.- id
character. Optional. Unique layer id.
- nb
numeric. Optional. Number of lines (default 16).
- pos
numeric vector. Optional. Position of the lines (default c(10, 10)). If
coords = "svg", values are in SVG coordinates. Ifcoords = "geo", values are longitude and latitude.- coords
character. Optional. Coordinate system for
pos(default "svg"). Ifcoords = "geo"and the map is zoomable, lines follow zoom interactions.- stroke
character. Optional. Stroke color (default "#394a70").
- strokeWidth
numeric. Optional. Stroke width (default 1).
- strokeOpacity
numeric. Optional. Stroke opacity (default 0.3).
- strokeDasharray
numeric or vector. Optional. Stroke dash pattern (default c(3, 2)).
- ...
Additional SVG attributes (e.g.
opacity,strokeLinecap, etc.).
Examples
library(sf)
world <- st_read(
system.file("gpkg/world.gpkg", package = "geoviz"),
quiet = TRUE
)
viz_create(projection = "EqualEarth", background = "white") |>
viz_path(datum = world, fill = "#f1f3f5") |>
viz_rhumbs(
nb = 32, coords = "geo", pos = c(0, 0),
fill = "#38896F"
) |>
viz_render()