Is there a way to make ggplot place the legend on top but below the title?
As an example...
Edit Ignore this. The issue is not longer a problem. But the code has been updated so that it no longer throws an error.
While waiting for the next version, you can fine tune within ggplot2. For instance:
ggplot(carrots, aes(y = Yield, x = Field, fill = Breed)) +
geom_bar(stat = "identity") +
theme(
plot.margin = unit(c(2, 1, 1, 1), "cm"),
plot.title = element_text(size = 30, face = "bold", colour = "blue", vjust = 7),
legend.direction = "horizontal",
legend.position = c(0.1, 1.05)) +
ggtitle("Title") +
labs(fill = "")