Skip to content

Commit

Permalink
Replace deprecated igraph functions by their newer equivalent
Browse files Browse the repository at this point in the history
Works towards se-sic#260.

Signed-off-by: Maximilian Löffler <[email protected]>
  • Loading branch information
MaLoefUDS committed Aug 27, 2024
1 parent 74ebe0b commit 0ac804e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util-plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ plot.get.plot.for.network = function(network, labels = TRUE) {
names(PLOT.VERTEX.TYPES) = c(TYPE.AUTHOR, TYPE.ARTIFACT)

## remove loops because of weird behavior when plotting
network = igraph::delete_edges(network, igraph::E(network)[igraph::is.loop(network)])
network = igraph::delete_edges(network, igraph::E(network)[igraph::which_loop(network)])

## fix the type attributes (add new ones, also named)
network = plot.fix.type.attributes(network)

## set igraph network layout if no layout is set yet
if (!("layout" %in% igraph::list.graph.attributes(network))) {
if (!("layout" %in% igraph::graph_attr_names(network))) {
network = igraph::set_graph_attr(network, "layout", "kk")
}
layout.algorithm = igraph::graph_attr(network, "layout")
Expand Down

0 comments on commit 0ac804e

Please sign in to comment.