A custom theme for making plots in ggplot2.

jTheme()

Examples

# Make example plot:
library(ggplot2)
data("midwest", package = "ggplot2")
plot <- ggplot(midwest, aes(x = area, y = poptotal)) +
    geom_point(aes(col = state, size = popdensity)) +
    geom_smooth(method = "loess", se = FALSE) +
    xlim(c(0, 0.1)) +
    ylim(c(0, 500000)) +
    labs(subtitle = "Area Vs Population",
        y = "Population",
        x = "Area",
        title = "Scatterplot",
        caption = "Source: midwest")
plot
#> `geom_smooth()` using formula = 'y ~ x'
#> Warning: Removed 15 rows containing non-finite values (`stat_smooth()`).
#> Warning: Removed 15 rows containing missing values (`geom_point()`).


# Add jTheme
plot + jTheme()
#> `geom_smooth()` using formula = 'y ~ x'
#> Warning: Removed 15 rows containing non-finite values (`stat_smooth()`).
#> Warning: Removed 15 rows containing missing values (`geom_point()`).


# Add jTheme but keep legend
plot + jTheme() + theme(legend.position="right")
#> `geom_smooth()` using formula = 'y ~ x'
#> Warning: Removed 15 rows containing non-finite values (`stat_smooth()`).
#> Warning: Removed 15 rows containing missing values (`geom_point()`).