Theme for ggplot2 that is similar to the default style of charts in current versions of Microsoft Excel.
Value
An object of class theme().
Details
Excel derives its chart greys from the theme's tx1 colour
by luminance transform rather than hardcoding them. Since tx1 is
black in every built-in Office theme, these greys—"#D9D9D9"
gridlines, "#BFBFBF" axis lines, "#595959" text—are the
same whichever theme scale_colour_excel_new() is set to.
Since 2023 the default font in Excel has been Aptos, but base_family
defaults to "sans" because Aptos is rarely installed outside of
Office. Pass base_family = "Aptos Narrow" for a closer match if you
do have it.
See also
Other themes excel:
theme_excel()
Examples
library("ggplot2")
p <- ggplot(mtcars) +
geom_point(aes(x = wt, y = mpg, colour = factor(gear))) +
facet_wrap(~am)
p + theme_excel_new() + scale_colour_excel_new()
