missing plot title in ggplot2
- by Ben Mazzotta
How can I create a plot title in ggplot2? Am I making a silly syntax error?
The ggplot2 docs indicate that labs(title = 'foo') should work, but I can only get the arguments x='foo' and y='foo' to work with labs(). Neither ggtitle() nor title() worked either.
Here is an example.
x <- rnorm(10,10,1)
y <- rnorm(10,20,2)
xy.df <-…