layout_manipulate: manipulate layout

layout_manipulateR Documentation

manipulate layout

Description

functions to manipulate an existing layout

Usage

layout_rotate(xy, angle)

layout_mirror(xy, axis = "vertical")

Arguments

xy

graph layout

angle

angle for rotation

axis

mirror horizontal or vertical

Details

These functions are mostly useful for deterministic layouts such as layout_with_stress

Value

manipulated matrix of xy coordinates

Author(s)

David Schoch

Examples

library(igraph)
g <- sample_gnp(50,0.3)

xy <- layout_with_stress(g)

#rotate 90 degrees
xy <- layout_rotate(xy,90)

# flip horizontally
xy <- layout_mirror(xy,"horizontal")


graphlayouts documentation built on Nov. 24, 2022, 9:07 a.m.