Obtain or create layout for igraph object
Source:R/jamenrich-get-igraph-layout.R
get_igraph_layout.RdObtain or create layout for igraph object
Arguments
- g
igraphobject- layout
one of:
numericmatrix of layout coordinates, withnrow(layout)equal to the number of nodesigraph::vcount(g).functionthat takesigraphinput, and returnsnumericmatrix of layout coordinates.NULL: to use the layout embedded ingusingigraph::graph_attr(g, "layout")if it exists. If it does not exist, thenmake_circular=TRUEcauses a new layout to be created with arbitrary circular coordinates; ormake_circular=FALSEwill returnNULL.
- make_circular
logicalindicating whether to create a makeshift layout when the input data does not already contain layout coordinates, and whenlayoutis not supplied.- verbose
logicalindicating whether to print verbose output.- ...
additional arguments are ignored.
Value
numeric matrix of x,y coordinates with nrow equal
to the number of nodes in the input, from igraph::vcount(g).
Note that rownames() are defined to match node names
igraph::V(g)$name, unlike default igraph layouts.
Details
This function is a simple helper function intended to retrieve
the node layout for an igraph object. When layout is supplied
as a function it is used to define a specific layout matrix.
See also
Other jam utility functions:
ashape(),
avg_angles(),
avg_colors_by_list(),
cell_fun_bivariate(),
collapse_mem_clusters(),
colorRamp2D(),
curateIPAcolnames(),
deconcat_df2(),
display_colorRamp2D(),
enrichList2geneHitList(),
find_colname(),
find_enrich_colnames(),
get_hull_data(),
gsubs_remove(),
handle_igraph_param_list(),
isColorBlank(),
make_legend_bivariate(),
make_point_hull(),
mem_find_overlap(),
order_colors(),
rank_mem_clusters(),
rotate_coordinates(),
summarize_node_spacing(),
with_ht_opts(),
xyAngle()