# NOT RUN {
library(ggplot2)
# Default settings
plot <- drugTimeResponseCurve(TGGATESsmall, cell_lines = "Hepatocyte",
dose = c("Control", "Low", "Middle"), drugs = drugNames(TGGATESsmall)[6],
duration = c("2", "8", "24"))
# Customize title, x/y labels, x/y limits, colour palette and define
# custom ticks for x axis using the function argument ggplot2_args
customizations <- list(labs(title= 'My Custom Title', ylab = 'The y-axis'),
xlim(c(2, 24)), ylim(c(99,105)),
scale_color_brewer(palette="Set1"),
scale_x_continuous(breaks=c(2, 8, 24),
labels = c("Two", "Eight", "Twenty-Four"))
)
if(interactive()) {
drugTimeResponseCurve(TGGATESsmall, cell_lines = "Hepatocyte",
dose = c("Control", "Low", "Middle"),
drugs = drugNames(TGGATESsmall)[6], duration = c("2", "8", "24"),
ggplot_args = customizations)
}
# Customize the plot using standard ggplot2 syntax
if(interactive()) {
plot + labs(title= 'My Custom Title', ylab = 'The y-axis') +
xlim(c(2, 24)) + ylim(c(99,105)) + scale_color_brewer(palette="Set1")
}
# }
Run the code above in your browser using DataLab