Learn R Programming

pkggraph (version 0.2.3)

plotd3: plotd3

Description

D3 network of a pkggraph object

Usage

plotd3(x, height = 500, width = 1000)

Arguments

x

plot object generated by neighborhood_graph or make_neighborhood_graph of type igraph

height

parameter to change the height of the d3 plot. Default is 500

width

parameter to change the width of the d3 plot. Default is 1000

Examples

Run this code
# NOT RUN {
  pkggraph::init(local = TRUE)
  plot_obj <- pkggraph::neighborhood_graph("hash")
  pkggraph::plotd3(plot_obj)

  plot_obj <- pkggraph::neighborhood_graph(c("hash","tidytext"))
  pkggraph::plotd3(plot_obj, height = 750, width = 1200)

  plot_obj <- pkggraph::neighborhood_graph(c("hash","Matrix"))
  pkggraph::plotd3(plot_obj)
# }

Run the code above in your browser using DataLab