Skip to contents

Allows for specification of specific brain regions to plot. Two different mouse attributes can be used as categorical variables to map to either the color or pattern aesthetics of the bar plot, e.g. sex and experimental group. The color aesthetic takes precedence over the pattern aesthetic so if you only want to use one mouse attribute, for plotting set it to the color_mapping parameter and set the pattern_mapping parameter to NULL.

Usage

plot_percent_colabel(
  e,
  colabel_channel = "colabel",
  channel = "eyfp",
  rois = c("AAA", "dDG", "HY"),
  color_mapping = "sex",
  colors = c("#952899", "#358a9c"),
  pattern_mapping = NULL,
  patterns = c("gray100", "hs_fdiagonal",
    "hs_horizontal\n                                              ", "gray90",
    "hs_vertical"),
  error_bar = "sem",
  ylim = c(0, 100),
  plot_individual = TRUE,
  height = 8,
  width = 8,
  print_plot = FALSE,
  save_plot = TRUE,
  image_ext = ".png"
)

Arguments

e

experiment object

colabel_channel

(str, default = "colabel") The channel used as the numerator in fraction counts.

channel

(str, default = "eyfp") The channel used as denominator in fraction counts.

rois

character vector of region acronyms, e.g. c("AAA", "DG)

color_mapping

(str, default = "sex") The name of the categorical variable (e.g., "sex", "age", etc.) to map to the color aesthetic of the bar plot.

colors

(str) character vector of the color values desired for the groups.

pattern_mapping

(str, default = "sex") The name of the categorical variable (e.g., "sex", "age", etc.) to map to the pattern aesthetic of the bar plot.

patterns

(str, default = c("gray100", 'hs_fdiagonal', "hs_horizontal", "gray90", "hs_vertical"), Pattern types to define subgroups.

error_bar

(str, c("sd", "sem)) options for which type of error bar to display, standard deviation or standard error of the mean.

ylim

(default = c(0,100)) The range of the y-axis

plot_individual

(boo) Whether or not to plot multiple

height

(default = 8) height of graphics devices in inches

width

(default = 8) height of graphics device in inches

print_plot

(bool, default = FALSE) whether or not to print the plot for just for display

save_plot

(bool, default = TRUE) whether or not to save the plor

image_ext

(default = ".png") extension determining the image type to save as

Value

p Plot handle to the figure

Examples

if (FALSE) {
 plot_percentage_colabel
}