Skip to contents

This function creates a custom theme for ggplot with several theme modifications

Usage

theme_dc(borderMode = "default", ...)

Arguments

borderMode

the theme borderMode, depending on `default` use, `facet` usage, or `borders`.

...

Additional parameters that can be passed into the theme() function. Added last to theme.

Value

The function returns a ggplot theme

Examples

library(ggplot2)
library(styles)

# Create basic ggplot object
ggplotObject <- ggplot(mtcars, aes(y=mpg, x=wt, color=as.factor(cyl))) +
    geom_point(size = 3, alpha = 0.5) +
    scale_color_dc()

# Add the theme
ggplotObject + theme_dc()


# Add the theme with additional optional theme parameters
ggplotObject + theme_dc(legend.position = 'right')