I am trying to plot data with a classic look and black axis labels. Yet, theme_classic has two different shades of grey for the axis tick labels and the ticks.
Using the mtcars dataset and p1 as listed in ?theme_classic I tried
p1 + theme_classic(axis.text.x = element_text(colour="black"))
but this just works with theme not theme_classic.
Is there a way to get black axis ticks and labels without having to specify a classic theme from scratch?
You need to add customizations to theme() calls after theme_classic(). Try:
p1 + theme_classic() +
theme(
axis.text.x = element_text(color="black"),
axis.ticks = element_line(color = "black")
)
The only arguments theme_***() functions typically take are base size and family related arguments. Additional customization is done through plain theme().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With