ggplot.igraph: Plot an igraph object

View source: R/graph.r

ggplot.igraphR Documentation

Plot an igraph object

Description

Plot an igraph object

Usage

## S3 method for class 'igraph'
ggplot(
  data = NULL,
  mapping = aes(),
  layout = "nicely",
  ...,
  environment = parent.frame()
)

## S3 method for class 'mechgraph'
ggplot(
  data = NULL,
  mapping = aes(),
  layout = "nicely",
  ...,
  environment = parent.frame()
)

Arguments

data

an igraph object (or a mechgraph object for the ggplot.mechgraph method) to be converted and plotted.

mapping

default aesthetics, default is aes().

layout

network layout. Supported values are the layout names handled by layout_circular, layout_linear, layout_fishbone and other ggtangle/igraph layouts, or a custom layout function. Default is "nicely".

...

additional parameters passed to the layout function.

environment

environment in which to evaluate the mapping, default is parent.frame().


ggtangle documentation built on Oct. 10, 2026, 9:06 a.m.