get_igraph_layout: Obtain or create layout for igraph object

get_igraph_layoutR Documentation

Obtain or create layout for igraph object

Description

Obtain or create layout for igraph object

Usage

get_igraph_layout(g, layout = NULL, make_circular = TRUE, verbose = FALSE, ...)

Arguments

g

igraph object

layout

one of:

  • numeric matrix of layout coordinates, with nrow(layout) equal to the number of nodes igraph::vcount(g).

  • function that takes igraph input, and returns numeric matrix of layout coordinates.

  • NULL: to use the layout embedded in g using igraph::graph_attr(g, "layout") if it exists. If it does not exist, then make_circular=TRUE causes a new layout to be created with arbitrary circular coordinates; or make_circular=FALSE will return NULL.

make_circular

logical indicating whether to create a makeshift layout when the input data does not already contain layout coordinates, and when layout is not supplied.

verbose

logical indicating whether to print verbose output.

...

additional arguments are ignored.

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.

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.

See Also

Other jam utility functions: avg_angles(), avg_colors_by_list(), call_fn_ellipsis_deprecated(), cell_fun_bivariate(), collapse_mem_clusters(), colorRamp2D(), deconcat_df2(), display_colorRamp2D(), enrichList2geneHitList(), filter_mem_genes(), filter_mem_sets(), find_colname(), 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()


jmw86069/multienrichjam documentation built on Nov. 3, 2024, 10:29 p.m.