Description Usage Arguments Value Author(s) Examples
Reads a DGEobj and produces a node pair file defining parent/child relationships between data items in the DGEobj. Plot them with Function graphDGEobj.
1 |
DGEobj |
A workflow object of DGEobj class data. |
A class igraph network object.
John Thompson, jrt@thompsonclan.org
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | library(igraph)
library(RColorBrewer)
# Prepare an iGraph object for plotting
mynet <- mapDGEobj(dgeObj)
#define a layout
lay.sug <- layout_with_sugiyama(mynet)
#2D Plot
plot(mynet,
edge.arrow.size=.3,
vertex.color="dodgerblue2",
vertex.frame.color="dodgerblue4",
layout=lay.sug$layout)
#2D Plot; colorby the basetype attribute
pal <- brewer.pal(length(unique(V(mynet)$basetype)), "Set1")
myPallet <- pal[as.numeric(as.factor(vertex_attr(mynet, "basetype")))]
plot(mynet,
edge.arrow.size=.3,
vertex.color = myPallet,
vertex.label.family = "Helvetica",
layout=lay.sug$layout
)
#2D Interactive plot
plotHandle <- tkplot(net,
vertex.color=myPallet,
vertex.frame.color="dodgerblue4",
canvas.width = 800,
canvas.height = 800,
layout=lay.sug$layout)
tk_close(plotHandle)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.