Clean up plots from their defaults.
1 2 3 4 5
A plotly, or ggvis
For plotly, an option to dispaly the mode bar. Defaults to FALSE.
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.
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.