I'm having issues using theme() in ggplot2.
Here's the plot:
ggplot(data=graph.data, aes(Tree, Proportion))
+ geom_bar(stat="identity", fill="black")
+ geom_errorbar(data=graph.data, mapping=aes(x=Tree, ymin=Proportion-SE, ymax=Proportion+SE), width=0.255)
+ labs(title="Corrected mean LdNPV mortality", x="Tree line", y="Percent mortality")
+ geom_text(aes(x=Tree, y=Proportion+SE+0.05, label=Letters))
+ theme(text=element_text(color="blue", size=12))
Setting the color to blue worked on the plot title and axis titles, but not axis text. Further, the size of the plot title remains larger than the size of the axis titles which is larger than the axis text. Increasing it to size=20 increases the plot title, axis titles, and axis text, but again, not to uniform sizes. Any ideas what's going on?
Reproducible example:
cities <- c("New York", "Tokyo", "London")
number <- c(20, 50, 35)
letter <- c("a", "b", "ab")
dummy.data <- data.frame(cities, number, letter)
ggplot(data=dummy.data, aes(cities, number)) +
geom_bar(stat="identity", fill="black") +
labs(title="Plot title", x="X axis title", y="Y axis title") +
geom_text(aes(x=cities, y=number+5, label=letter)) +
theme(text=element_text(color="blue", size=12))