
Last chance! 50% off unlimited learning
Sale ends in
ggplot2
themetheme_nice
is designed to work like any other complete theme from
ggplot
. It has a nice appearance.
theme_nice(
legend.pos = "right",
style = c("white", "light", "dark_blue", "dark_gray"),
base_size = 11,
base_family = "",
base_line_size = base_size/22,
base_rect_size = base_size/22
)
One of "right"
, "left"
, "top"
, "bottom"
(outside
the plotting area), "topleft"
, "topright"
, "topmiddle"
,
"bottomleft"
, "bottomright"
, or "bottommiddle"
(inside the plotting
area).
One of "white"
, "light"
, "dark_blue"
, or "dark_gray"
.
"white"
sets the background to white, "light"
to light gray,
"dark_gray"
to dark gray, "dark_blue"
to dark blue.
base font size, given in pts.
base font family
base size for line elements
base size for rect elements
Jacob Long jacob.long@sc.edu
# Create plot with ggplot2
library(ggplot2)
plot <- ggplot(mpg, aes(cty, hwy)) +
geom_jitter() + theme_nice()
Run the code above in your browser using DataLab