This package simlifies the plot.igraph function for faster plotting of igraph objects

igplot(
  g,
  layout = NULL,
  directed = FALSE,
  bg_col = "white",
  plot_opts = list(),
  outfile = NULL,
  width = 7,
  height = 7,
  return_data = FALSE,
  plot = TRUE,
  corp = FALSE
)

Arguments

g

an igraph object, a matrix or data.table object with two columns containing the edgelist, or a igplotdat object

layout

either a string that is equal to the igraph function that creates the layout (e.g., "layout_with_fr") or a two-dimensional matrix of the coordinates of the vertices

directed

boolean; if g is not an igraph object, indicates whether the edgelist is directed or not

bg_col

background color

plot_opts

a named list containing plotting options (see details)

outfile

path to file

width

width of the pdf file (in inches)

height

height of the pdf file (in inches)

return_data

whether to return the data

plot

whether to create the plot

corp

boolean; if TRUE corps the image to the positions of nodes

Details

Currently, the following options are supported for the plot_opts list:

  1. v_frame, vertex frame color

  2. v_lwd, vertex frame thickness

  3. v_fill, vertex fill color

  4. v_cex, vertex size

  5. v_pch, vertex pch

  6. e_col, edge color

  7. e_lwd, edge linewidth

  8. e_length, length of the arrow when directed is TRUE

  9. e_angle, angle of the arrow when directed is TRUE