plotGraph: Plot a graph

View source: R/plot.R

plotGraphR Documentation

Plot a graph

Description

Plotting utility for graphs

Usage

plotGraph(
  gr,
  node.label = "SYMBOL",
  node.data = NULL,
  edge.data = NULL,
  node.color = "firebrick",
  edge.color = "firebrick",
  edge.mode = c("directed", "undirected"),
  layout = c("fruchterman.reingold", "circle")
)

Arguments

gr

graph. An object of class graphNEL from the graph package.

node.label

character. A node data attribute that is used to label the nodes.

node.data

character. A node data attribute that is used to overlay on the nodes using different colors.

edge.data

character. An edge data attribute that is used to overlay on the edges using different line types.

node.color

character. Default color for the nodes. Is overwritten by node.data if not null.

edge.color

character. Default color for the edges.

edge.mode

character. Whether to display directed or undirected edges.

layout

character. Circular layout or network layout.

Value

A ggplot.

Examples

     library(BioPlex)
     corum.df <- getCorum("core")
     corum.glist <- corum2graphlist(corum.df)
     gr <- corum.glist[["CORUM107_TFIIH_transcription_factor_complex"]]

     plotGraph(gr, edge.mode = "undirected", 
               edge.color = "grey", layout = "circle")


ccb-hms/BioPlexAnalysis documentation built on Jan. 29, 2023, 6:55 p.m.