layout_tbl_graph_metro {ggraph} | R Documentation |
Place nodes according to the standard design of metro maps
Description
This layouttries to optimise the placement of nodes so that they adhere to the classic look of metro maps. As such it optimizes on the distribution of incident edge angles, conformity of edge length, and edge angles in multiples of 45 degrees. As it works as a refinement of an already existing layout (the physical location of metro stations) it requires an a priori node location. Due to it's purpose it probably works best with planar graphs.
Usage
layout_tbl_graph_metro(
graph,
x,
y,
length = 2,
grid_space = 0.0025,
optimization_weights = NULL,
max_movement = 5,
circular = FALSE
)
Arguments
graph |
A tbl_graph object |
x , y |
The start location of the nodes |
length |
Desired multiple of grid point spacing. ( |
grid_space |
The distance between consecitive grid points |
optimization_weights |
The relative weight to be placed on the 5 criteria during optimization as a numeric vector of length 4. The criteria are:
|
max_movement |
Number of grid points a station can move away rom its original position |
circular |
ignored |
Value
A data.frame with the columns x
, y
, circular
as
well as any information stored as node variables in the tbl_graph object.
Author(s)
The underlying algorithm is implemented in the graphlayouts package by David Schoch
References
Stott, J., Rodgers, P., Martinez-Ovando, J. C., and Walker, S. G. (2011). Automatic metro map layout using multicriteria optimization In IEEE Trans Vis Comput Graph 17(1) pp. 101-114. https://doi.org/10.1109/tvcg.2010.24
See Also
Other layout_tbl_graph_*:
layout_tbl_graph_auto()
,
layout_tbl_graph_backbone()
,
layout_tbl_graph_cactustree()
,
layout_tbl_graph_centrality()
,
layout_tbl_graph_circlepack()
,
layout_tbl_graph_dendrogram()
,
layout_tbl_graph_eigen()
,
layout_tbl_graph_fabric()
,
layout_tbl_graph_focus()
,
layout_tbl_graph_hive()
,
layout_tbl_graph_htree()
,
layout_tbl_graph_igraph()
,
layout_tbl_graph_linear()
,
layout_tbl_graph_manual()
,
layout_tbl_graph_matrix()
,
layout_tbl_graph_partition()
,
layout_tbl_graph_pmds()
,
layout_tbl_graph_sf()
,
layout_tbl_graph_stress()
,
layout_tbl_graph_treemap()
,
layout_tbl_graph_unrooted()