I have tried
... + xlab("New label", colour="darkgrey")
and
... + xlab("New label", color="darkgrey")
But it says this argument is unused. I look into ?xlab
, but it doesn't include any color parameter. Is it possible to change it? How?
Since ggplot2 0.9.2, the syntax has become:
dat <- data.frame(x = 1:5,y = 1:5)
p + theme(axis.title.x = element_text(colour = "red"),
axis.title.y = element_text(colour = "blue"))
The tidyverse page is a good starting point for learning about all the options.
Note that the old syntax based on opts
has been deprecated. There is detailed transition guide for updating your code.
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