【问题标题】:showing data frame in igraph在 igraph 中显示数据框
【发布时间】:2012-10-05 23:20:32
【问题描述】:

我的数据框被调用

p

Impacted_system, Application_Caused_Incident Number_of_Incident                   
Web                  Financials        10                   
PeopleSoft           HR                30
PPP                  PeopleSoft        50

我喜欢展示 igraph 图,其中包含要受影响的系统的边缘,边缘有文本以显示受影响的系统和事件数。

我这样做了:

g <- graph.data.frame(p)
plot.igraph(g)

我得到带有数字的边的图形。我非常喜欢看 HR、Web 和边缘事件数量等文本。有什么想法吗?

【问题讨论】:

标签: r igraph


【解决方案1】:

这行得通:

g <- graph.data.frame(p)
plot(g,  layout = layout.fruchterman.reingold,  vertex.label = V(g)$name)

【讨论】:

    猜你喜欢
    • 2018-10-24
    • 2022-01-14
    • 2016-04-04
    • 2020-04-14
    • 1970-01-01
    • 1970-01-01
    • 2019-08-14
    • 2015-09-12
    • 2016-12-21
    相关资源
    最近更新 更多