更多 ggnet 繪圖選項
ggnet 與其他 igraph 替代方案的真正強大之處,在於只要做少量參數設定,就能產生進階的圖形。前面比較兩種繪圖方法的例子看起來有些相似;不過,在本課你會看到如何做出更進階的視覺化。我們會拿 Twitter 資料集,先用 igraph 加上多個頂點屬性(中心性與社群),再用 ggnet 迅速把它們畫出來。
你在上一個練習建立的中心性與社群成員屬性仍然可用。
本練習屬於課程
案例研究:R 的網路分析
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Convert to a network object
retweet_net <- ___(___)
# Plot with ggnet2
ggnet2(
___
# Set the node size to cent
___ = "___",
# Set the node color to comm
___ = "___",
# Set the color palette to Spectral
___ = "___",
)