Skip to content

Alternative draw_lines methods #289

@mtennekes

Description

@mtennekes

I'm looking for alternative methods to draw lines between nodes. For instance, curved arcs

or half lines:

image

I'm happy to write my own functions, but would like to know what the easiest method is to 'submit' the created sf linestrings to the sfnetwork object.

So far I found out: that for an sfnetwork object x created with edges_as_lines = FALSE, I can add straight lines with

x = sfnetworks:::explicative_edges(x)

which runs sfnetworks:::draw_lines under the hood.

What would be helpful is a function like for instance::

x = explicitize_edges(x, fun = draw_curved_arcs, curvature = 15)

where

draw_curved_arcs = function(sfc_from, sfc_to, curvature = 30) {... }

is a just an example similar to draw_lines but user defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions