Description Usage Arguments Value Examples
View source: R/visualizeResults.R
Given a string corresponding to a background style, returns a matching ggplot2 function that can be used by PeakMapper's plotting functions to create plots with the specified background style. If the supplied string is not one of either "grey", "blackAndWhite", or "minimal", the ggplot2 function corresponding to the "blackAndWhite" style will be returned. Note that this is a helper function for PeakMapper's various plotting functions and should NOT be called directly by the user.
1 | getBackgroundStyle(background)
|
background |
The style of the plot background. This must be one of either "grey" (for a grey-panelled background), "blackAndWhite" (for a white-panelled background), or "minimal" (for a background with no panelling). Otherwise, the background style corresponding to "blackAndWhite" will be returned |
A ggplot2 theme function to be used by one of PeakMapper's plotting functions to determine the background layout. This function is either theme_grey() (if "grey" is input), theme_bw() (if "blackAndWhite" is input, or the user does not provide a valid input), or theme_classic() (if "minimal" is input)
1 2 3 4 5 6 7 | ## Not run:
mappingResult <- mapPeaks(H3K27me3Peaks, WS263Genes)
backgroundStyle <- getBackgroundStyle("grey")
ggplot2::ggplot() + backgroundStyle +
ggplot2::geom_bar(aes(as.factor(mappingResult$Peak_Position)))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.