theme_trueMinimal: Clean visualizations

Description Usage Arguments Details Examples

View source: R/gg_clean.R

Description

Clean up plots from their defaults.

Usage

1
2
3
4
5

Arguments

vis

A plotly, or ggvis

MB

For plotly, an option to dispaly the mode bar. Defaults to FALSE.

Details

From a gray background, to unnecessary gridlines, to by-default reference lines, some of the more popular visualization packages come out 75 'de-bold' the blacks, etc. **ggplot2**: This function takes a ggplot object and removes the gray background, gridlines and adds opacity to the default black axes and labels, allowing the pattern of the visual to be expressed in unimpeded fashion.

Plotly will put reference lines at zero, and some of its 'modebar' is unnecessary. Otherwise little is changed at this point, except for theme_blank, which is like theme_void for ggplot.

Examples

1
2
3
4
5
6
7
8
require(lazerhawk)
require(ggplot2)
data(mtcars)
# currently ggplot is having a problem with rlang so this is commented until they fix it
# ggplot(aes(wt, mpg), data=mtcars) + theme_trueMinimal()
require(plotly)
mtcars %>% plot_ly(x=~wt, y=~mpg, mode='markers') %>% theme_plotly()
mtcars %>% plot_ly(x=~wt, y=~mpg, mode='markers') %>% theme_blank()

mclark--/lazerhawk documentation built on July 17, 2018, 3:11 a.m.