From 7ac840d287a862eff61b1a84e194a4cba399f9e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20L=C3=B6ffler?= Date: Tue, 27 Aug 2024 16:53:12 +0200 Subject: [PATCH] Replace deprecated igraph functions by their newer equivalent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Works towards #260. Signed-off-by: Maximilian Löffler --- util-plot.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-plot.R b/util-plot.R index 10428567..92e16e21 100644 --- a/util-plot.R +++ b/util-plot.R @@ -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")