Controls content and size of all peripheral texts.
Usage
.ggplotLigerTheme(
plot,
title = NULL,
subtitle = NULL,
xlab = TRUE,
ylab = TRUE,
xlabAngle = 0,
legendColorTitle = NULL,
legendFillTitle = NULL,
legendShapeTitle = NULL,
legendSizeTitle = NULL,
showLegend = TRUE,
legendPosition = "right",
baseSize = getOption("ligerBaseSize"),
titleSize = NULL,
subtitleSize = NULL,
xTextSize = NULL,
xFacetSize = NULL,
xTitleSize = NULL,
yTextSize = NULL,
yFacetSize = NULL,
yTitleSize = NULL,
legendTextSize = NULL,
legendTitleSize = NULL,
legendDotSize = 4,
panelBorder = FALSE,
legendNRow = NULL,
legendNCol = NULL,
colorLabels = NULL,
colorValues = NULL,
colorPalette = "magma",
colorDirection = -1,
naColor = "#DEDEDE",
colorLow = NULL,
colorMid = NULL,
colorHigh = NULL,
colorMidPoint = NULL,
plotly = FALSE
)Arguments
- plot
ggplot object passed from wrapper plotting functions
- title, subtitle, xlab, ylab
Main title, subtitle or X/Y axis title text. By default, no main title or subtitle will be set, and X/Y axis title will be the names of variables used for plotting. Use
NULLto hide elements.TRUEforxlaborylabshows default values.- xlabAngle
Numeric, counter-clockwise rotation angle of X axis label text. Default
0shows horizontal text.- legendColorTitle
Legend title text for color aesthetics, often used for categorical or continuous coloring of dots. Default
NULLshows the original variable name.- legendFillTitle
Legend title text for fill aesthetics, often used for violin, box, bar plots. Default
NULLshows the original variable name.- legendShapeTitle
Legend title text for shape aesthetics, often used for shaping dots by categorical variable. Default
NULLshows the original variable name.- legendSizeTitle
Legend title text for size aesthetics, often used for sizing dots by continuous variable. Default
NULLshows the original variable name.- showLegend
Whether to show the legend. Default
TRUE.- legendPosition
Text indicating where to place the legend. Choose from
"top","bottom","left"or"right". Default"right".- baseSize
One-parameter control of all text sizes. Individual text element sizes can be controlled by other size arguments. "Title" sizes are 2 points larger than "text" sizes when being controlled by this.
- titleSize, xTitleSize, yTitleSize, legendTitleSize
Size of main title, axis titles and legend title. Default
NULLcontrols bybaseSize + 2.- subtitleSize, xTextSize, yTextSize, legendTextSize
Size of subtitle text, axis texts and legend text. Default
NULLcontrols bybaseSize.- xFacetSize, yFacetSize
Size of facet label text. Default
NULLcontrols bybaseSize - 2.- legendDotSize
Allow dots in legend region to be large enough to see the colors/shapes clearly. Default
4.- panelBorder
Whether to show rectangle border of the panel instead of using ggplot classic bottom and left axis lines. Default
FALSE.- legendNRow, legendNCol
Integer, when too many categories in one variable, arranges number of rows or columns. Default
NULL, automatically split toceiling(levels(variable)/10)columns.- colorLabels
Character vector for modifying category names in a color legend. Passed to
ggplot2::scale_color_manual(labels). DefaultNULLuses original levels of the factor.- colorValues
Character vector of colors for modifying category colors in a color legend. Passed to
ggplot2::scale_color_manual(values). DefaultNULLuses internal selected palette when <= 26 categories are presented, otherwise ggplot hues.- colorPalette
For continuous coloring, an index or a palette name to select from available options from ggplot
scale_brewerorviridis. Default"magma".- colorDirection
Choose
1or-1. Applied whencolorPaletteis from Viridis options. Default-1use darker color for higher value, while1reverses this direction.- naColor
The color code for
NAvalues. Default"#DEDEDE".scale_colour_gradient2. DefaultNULL.- colorLow, colorMid, colorHigh, colorMidPoint
All four of these must be specified to customize palette with
- plotly
Whether to use plotly to enable web based interactive browsing for the plot. Requires installation of package "plotly". Default
FALSE.