jTheme: Theme settings for plotting using ggplot2

View source: R/jTheme.R

jThemeR Documentation

Theme settings for plotting using ggplot2

Description

A custom theme for making plots in ggplot2.

Usage

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

# Add jTheme
plot + jTheme()

# Add jTheme but keep legend
plot + jTheme() + theme(legend.position="right")

jhelvy/jhelvyr documentation built on July 14, 2024, 9:58 p.m.