spread_igraph_labels | R Documentation |
Spread igraph node labels by angle from node center
spread_igraph_labels(
g,
layout = NULL,
y_bias = 1,
update_g_coords = TRUE,
do_reorder = TRUE,
sortAttributes = NULL,
nodeSortBy = c("x", "-y"),
repulse = 3.5,
force_relayout = FALSE,
label_min_dist = 0.5,
verbose = FALSE,
...
)
g |
igraph object |
layout |
numeric matrix representing the x and y
coordinates of each node in |
y_bias |
numeric value indicating the tendency to spread labels on the y-axis rather than symmetrically around each node. This argument elongates the circle surrounding a node into an ellipse with this ratio. |
update_g_coords |
logical indicating whether the layout
coordinates will be stored in |
do_reorder |
logical indicating whether to call
|
sortAttributes , nodeSortBy |
arguments passed to
|
repulse |
argument passed to |
force_relayout |
logical indicating whether the |
label_min_dist |
numeric value used to ensure all labels are at least some distance from the center. These units are defined by igraph, and are roughly in units of one line height of text. |
... |
additional arguments are passed to |
This function uses the igraph vertex attribute
"label.degree"
, which describes the angular offset for
each vertex label. (The "label.degree"
values are
represented as radians, not degrees, starting at 0 for
right, and proceeding clockwise starting from the right,
down, left, top, right.)
This function requires a network layout, which must be fixed in order for the vertex labels to be properly oriented. Labels are oriented opposite the most dominant angular mean of edges from each network node. Typically the side of a node with the fewest edges has the most space to place a label. No further checks are performed for overlapping labels.
Note that this function only modifies the other important
attribute "label.dist"
when 'label_min_dist“ is defined,
in order to enforce a minimum label distance from the center
of each node. There is no other logic to position small or
large labels to avoid overlapping labels.
Other jam igraph functions:
cnet2df()
,
cnet2im()
,
cnetplotJam()
,
cnetplot_internalJam()
,
color_edges_by_nodegroups()
,
color_edges_by_nodes_deprecated()
,
color_edges_by_nodes()
,
color_nodes_by_nodegroups()
,
communities2nodegroups()
,
drawEllipse()
,
edge_bundle_bipartite()
,
edge_bundle_nodegroups()
,
enrichMapJam()
,
fixSetLabels()
,
flip_edges()
,
get_bipartite_nodeset()
,
igraph2pieGraph()
,
jam_igraph()
,
jam_plot_igraph()
,
label_communities()
,
layout_with_qfrf()
,
layout_with_qfr()
,
mem2emap()
,
memIM2cnet()
,
mem_multienrichplot()
,
nodegroups2communities()
,
rectifyPiegraph()
,
relayout_with_qfr()
,
removeIgraphBlanks()
,
removeIgraphSinglets()
,
reorderIgraphNodes()
,
rotate_igraph_layout()
,
subgraph_jam()
,
subsetCnetIgraph()
,
subset_igraph_components()
,
sync_igraph_communities()
,
with_qfr()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.