View source: R/bipartite_graph.R
bipartite_graph | R Documentation |
This function plots the ziggurat graph of a bipartite network. Configuration parameters and results are stored in a global environment called bpp. This environment is not destroyed after the function is executed, so the developer can store it in a configuration file, retrieve network analysis variables and so on. If a new bipartite_graph is called, bpp is destroyed and created again for the new plot. Plotting options are explained in the user manual.
bipartite_graph(
datadir,
filename,
paintlinks = TRUE,
print_to_file = FALSE,
plotsdir = "plot_results/",
orderkcoremaxby = "kradius",
style = "legacy",
guild_gap_increase = 1,
flip_results = FALSE,
aspect_ratio = 1,
alpha_level = 0.2,
color_guild_a = c("#4169E1", "#00008B"),
color_guild_b = c("#F08080", "#FF0000"),
color_link = "slategray3",
alpha_link = 0.5,
size_link = 0.5,
lsize_kcoremax = 3,
lsize_kcore1 = 2.5,
lsize_legend = 4,
lsize_core_box = 2.5,
labels_color = c(),
hide_plot_border = TRUE,
corebox_border_size = 0.2,
label_strguilda = "",
label_strguildb = "",
landscape_plot = TRUE,
backg_color = "white",
show_title = TRUE,
show_legend = "TOP",
file_name_append = "",
svg_scale_factor = 10,
weighted_links = "none",
square_nodes_size_scale = 1,
zoom_svgplot = 1,
progress = NULL
)
datadir |
the name of the file of the interaction matrix |
filename |
the file with the interaction matrix |
print_to_file |
if set to FALSE the plot is displayed in the R session window |
plotsdir |
the directory where the plot is stored |
orderkcoremaxby |
sets order of kcoremax nodes, by kradius or kdegree |
style |
bipartite representation style: legacy, kcoreorder, chilopod |
guild_gap_increase |
controls the disptance between guild rows |
flip_results |
displays the graph in portrait configuration |
aspect_ratio |
ziggurat plot default aspect ratio |
alpha_level |
transparency for ziggurats' filling |
color_guild_a |
default filling for nodes of guild_a |
color_guild_b |
default filling for nodes of guild_b |
color_link |
default links color |
alpha_link |
link transparency |
size_link |
width of the links |
lsize_kcoremax |
nodes in kshell max label size |
lsize_legend |
legend label size |
labels_color |
default label colors |
hide_plot_border |
hide border around the plot |
corebox_border_size |
width of kshell boxes |
label_strguilda |
string labels of guild a |
label_strguildb |
string labels of guild b |
landscape_plot |
paper landscape configuration |
backg_color |
plot background color |
show_title |
show plot title |
show_legend |
show plot legend position |
file_name_append |
a label that the user may append to the plot file name for convenience |
svg_scale_factor |
only for interactive apps, do not modify |
weighted_links |
function to add link weight: 'none', 'log10' , 'ln', 'sqrt' |
square_nodes_size_scale |
scale nodes area of kcore1 and outsiders |
zoom_svgplot |
scale SVG plot, just for interactive applications |
progress |
only for interactive apps, do not modifiy |
bipartite_graph("data/","M_PL_001.csv",plotsdir="grafresults/",print_to_file = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.