Skip to contents

Plot a stacked bar plot of the degree distributions.

Usage

plot_degree_distributions(
  e,
  channels = c("cfos", "eyfp"),
  color_palettes = c("reds", "greens"),
  colors_manual = NULL,
  labels = c(female_AD = "female_AD_label", female_control = "female_control_label"),
  title = "my_title",
  height = 15,
  width = 15,
  xlim = c(0, 20),
  ylim = c(0, 15),
  image_ext = ".png",
  print_plot = TRUE,
  theme.gg = NULL,
  save_plot = TRUE
)

Arguments

e

experiment object

channels

(str, default = c("cfos", "eyfp")) Channels to plot.

color_palettes

(str, default = c("reds", "greens")) Color palettes from grDevices::hcl.colors that are used to for plotting networks for each channel, respectively.

colors_manual

(str, default = NULL ) Manually choose the hexadecimal color codes to create a custom color palette, e.g. colors_manual = c("#660000", "#FF0000", "#FF6666"). Warning: this color will be applied to all channels. It's recommended to set the channels parameter to a single channel if this parameter is used.

labels

(e.g. labels = c(network1_name = "network 1 label", network2_name = "network 2 label)) The legend labels to correspond with your respective network names.

title

(str, default = "my_title") the experiment object output folder.

height

(int, default = 15) Height of the plot in inches.

width

(int, default = 15) Width of the plot in inches.

xlim

(vec, default = c(0,20)) axes limits x-axis

ylim

(vec, default = c(0,15))axes limits of y-axis

image_ext

(default = ".png") image extension to the plot as.

print_plot

(bool, default = TRUE) Whether to print the plot as an output.

theme.gg

(default = NULL) Option to use custom ggplot2 theme if the user wants

save_plot

(bool, default = TRUE) Save into the figures subdirectory of the the experiment object output folder.

Value

p_list A list the same length as the number of channels, with each element containing a plot handle for that channel.