Obtain or create layout for igraph object
Source:R/jamenrich-get-igraph-layout.R
get_igraph_layout.Rd
Obtain or create layout for igraph object
Arguments
- g
igraph
object- layout
one of:
numeric
matrix of layout coordinates, withnrow(layout)
equal to the number of nodesigraph::vcount(g)
.function
that takesigraph
input, and returnsnumeric
matrix of layout coordinates.NULL
: to use the layout embedded ing
usingigraph::graph_attr(g, "layout")
if it exists. If it does not exist, thenmake_circular=TRUE
causes a new layout to be created with arbitrary circular coordinates; ormake_circular=FALSE
will returnNULL
.
- make_circular
logical
indicating whether to create a makeshift layout when the input data does not already contain layout coordinates, and whenlayout
is not supplied.- verbose
logical
indicating 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()
,
bulk_cnet_adjustments()
,
call_fn_ellipsis_deprecated()
,
cell_fun_bivariate()
,
collapse_mem_clusters()
,
colorRamp2D()
,
deconcat_df2()
,
display_colorRamp2D()
,
enrichList2geneHitList()
,
filter_mem_genes()
,
filter_mem_sets()
,
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()
,
subgraph_jam()
,
subset_mem()
,
summarize_node_spacing()
,
xyAngle()