The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Packages

First, load ggplot2 alongside envalysis.

library(envalysis)
library(ggplot2)

Default theme

The following code chunk plots the ggplot2 mtcars sample data set with the default ggplot2 theme.

data("mtcars")

p <- ggplot(mtcars) +
  geom_point(aes(x = wt, y = mpg, color = factor(gear))) +
  labs(
    title = "Fuel economy declines as weight increases",
    subtitle = "(1973-74)",
    caption = "Data from the 1974 Motor Trend US magazine.",
    x = "Weight (1000 lbs)",
    y = "Fuel economy (mpg)",
    colour = "Gears"
  ) +
  facet_wrap( ~ am, labeller = labeller(am = c("0" = "Automatic",
                                               "1" = "Manual")))
p

theme_publish()

Adding theme_publish() applies the custom theme.

p + theme_publish()

theme_publish() allows for changing the base font face, font size, and line widths. More arguments may be passed to ggplot2’s theme_bw()

p + theme_publish(base_size = 16, base_family = "Times", base_linewidth = 0.7)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.