theme_SPSS | R Documentation |
Complete theme that controls all non-data display of a plot to mimic the
look of SPSS graphs. Use theme
after
theme_SPSS
to further tweak the display.
theme_SPSS( base_size = 12, base_family = "", base_line_size = 0.5, base_rect_size = 0.5, version = r2spss_options$get("version"), scales = NULL, scale.x = scales, scale.y = scales )
base_size |
an integer giving the base font size in pts. |
base_family |
a character string giving the base font family. |
base_line_size |
base size for line elements. |
base_rect_size |
base size for borders of rectangle elements. |
version |
a character string specifying whether to mimic the look
of recent SPSS versions ( |
scales, scale.x, scale.y |
a character string specifying whether both
or each of the axes are expected to be continuous ( |
# data to be plotted df <- data.frame(x = 1:30, y = 0) # initialize plot p <- ggplot(aes(x = x, y = y, fill = factor(x)), data = df) + geom_point(shape = 21, size = 3, show.legend = FALSE) + theme_SPSS() # colors of modern SPSS versions p + theme_SPSS() + scale_fill_SPSS() # colors of legacy SPSS versions p + theme_SPSS(version = "legacy") + scale_fill_SPSS(version = "legacy")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.