plot.SBM: SBM Plot

View source: R/R6Class-SBM.R

plot.SBMR Documentation

SBM Plot

Description

Basic matrix plot method for SBM object or mesoscopic view

Usage

## S3 method for class 'SBM'
plot(
  x,
  type = c("data", "expected", "meso"),
  ordered = TRUE,
  plotOptions = list(),
  ...
)

Arguments

x

an object inheriting from class SBM

type

character for the type of plot: either 'data' (true connection), 'expected' (fitted connection) or 'meso' (mesoscopic). Default to 'data'.

ordered

logical: should the rows and columns be ordered according to the clustering? Default to TRUE (not taken into account for 'meso').

plotOptions

list with parameters for 'meso' type plot and data type plot. Details are given below

...

additional parameters for S3 compatibility. Not used

Details

The list of parameters plotOptions for the mesoscopic plot is:

"seed":

seed to control the layout

"title":

character string for the title. Default value is NULL

"layout":

Default value = NULL

"vertex.color":

Default value is "salmon2"

"vertex.frame.color":

Node border color.Default value is "black"

"vertex.shape":

One of "none", "circle", "square", "csquare", "rectangle" "crectangle", "vrectangle", "pie", "raster", or "sphere". Default value = "circle"

"vertex.size":

Size of the node (default is 2)

"vertex.size2":

The second size of the node (e.g. for a rectangle)

"vertex.label.name":

Names of the vertices. Default value is the label of the nodes

"vertex.label.color":

Default value is "black"

"vertex.label.font":

Default value is 2. Font: 1 plain, 2 bold, 3, italic, 4 bold italic, 5 symbol

"vertex.label.cex":

Font size (multiplication factor, device-dependent).Default value is 0.9.

"vertex.label.dist":

Distance between the label and the vertex. Default value is 0

"vertex.label.degree":

The position of the label in relation to the vertex. default value is 0

"edge.threshold":

Threshold under which the edge is not plotted. Default value is = -Inf

"edge.color":

Default value is "gray"

"edge.width":

Factor parameter. Default value is 10

"edge.arrow.size":

Default value is 1

"edge.arrow.width":

Default value is 2

"edge.lty":

Line type, could be 0 or "blank", 1 or "solid", 2 or "dashed", 3 or "dotted", 4 or "dotdash", 5 or "longdash", 6 or "twodash". Default value is "solid"

"edge.curved":

Default value is = 0.3.

For type = 'data' or 'expected plot', the list of parameters plotOptions is

"legend":

Boolean. Set TRUE if you want to see the legend. Default value is FALSE

"legend.title":

Boolean. Set TRUE if you want to print the title of the legend. Default value is FALSE

"legend.position":

Position of the legend. Possible values are 'bottom', 'top','left,'right'. Default value is 'bottom'

"rowNames":

Set true if the rownames must be plotted. Default value is FALSE

"colNames":

Set true if the colNames must be plotted. Default value is FALSE

"line.color":

Chain of character. The color of the lines to separate groups if a clustering is provided. Default value is red

"line.width":

Numeric. Width of the lines to separate groups. Default value is NULL, automatically chosen

"title":

Chain of character. Title of the plot. Default value is NULL

Value

a ggplot2 object for the 'data' and 'expected', a list with the igraph object g and the layout for the 'meso'


GrossSBM/sbm documentation built on March 3, 2024, 7:11 a.m.