Description Usage Arguments Details Value Author(s) See Also

View source: R/plot_diffnet2.r

Another way of visualizing diffusion

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
plot_diffnet2(graph, ...)
## S3 method for class 'diffnet'
plot_diffnet2(graph, toa, slice = nslices(graph), ...)
## Default S3 method:
plot_diffnet2(graph, toa, pers = min(toa, na.rm =
TRUE):max(toa, na.rm = TRUE),
color.ramp = grDevices::colorRamp(c("steelblue", "gray", "tomato")),
layout = NULL, key.width = 0.1, key.args = list(),
main = "Diffusion dynamics", add.map = NULL,
diffmap.args = list(kde2d.args = list(n = 100)), diffmap.alpha = 0.5,
include.white = "first", vertex.size = "degree",
minmax.relative.size = getOption("diffnet.minmax.relative.size", c(0.01,
0.04)), no.graph = FALSE, ...)
``` |

`graph` |
Any class of accepted graph format (see |

`...` |
Further arguments passed to |

`toa` |
Integer vector of length |

`slice` |
Integer scalar. Number of slice to use as baseline for drawing the graph. |

`pers` |
Integer vector of length |

`color.ramp` |
A function as returned by |

`layout` |
Passed to |

`key.width` |
Numeric scalar. Sets the proportion of the plot (x-axis) that the key uses. |

`key.args` |
List. Further arguments to be passed to |

`main` |
Character scalar. Title of the graph. |

`add.map` |
Character scalar. When |

`diffmap.args` |
List. If |

`diffmap.alpha` |
Numeric scalar between [0,1]. Alpha level for the map. |

`include.white` |
Character scalar. Includes white in the color palette used in the map.
When |

`vertex.size` |
Either a numeric scalar or vector of size |

`minmax.relative.size` |
Passed to |

`no.graph` |
Logical scala. When |

Plotting is done via the function `plot.igraph`

.

When `vertex.size`

is either of `"degree"`

, `"indegree"`

, or
`"outdegree"`

, `vertex.size`

will be replace with `dgr(.,cmode = )`

so that the vertex size reflects the desired degree.

The argument `minmax.relative.size`

is passed to `rescale_vertex_igraph`

which adjusts `vertex.size`

so that the largest and smallest vertices
have a relative size of `minmax.relative.size[2]`

and
`minmax.relative.size[1]`

respectively with respect to the x-axis.

If `key.width<=0`

then no key is created.

By defult, the function passes the following values to `plot.igraph`

:

`vertex.label`

equals to`""`

`vertex.frame.color`

equals to`"white"`

`add`

equals to`TRUE`

`rescale`

equals to`FALSE`

`vertex.size`

equals to`rescale.fun(vertex.size)`

A list with the following elements

`layout` |
A numeric matrix with vertex coordinates. |

`vertex.color` |
A character vector with computed colors for each vertex. |

`vertex.label` |
The value passed to |

`vertex.shape` |
A character vector with assigned shapes. |

`vertex.size` |
A numeric vector with vertices sizes |

`diffmap` |
If |

George G. Vega Yon

Other visualizations: `dgr`

,
`diffusionMap`

, `drawColorKey`

,
`grid_distribution`

,
`hazard_rate`

, `plot_adopters`

,
`plot_diffnet`

,
`plot_infectsuscep`

,
`plot_threshold`

,
`rescale_vertex_igraph`

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.