答案 0 :(得分:3)
hjust
中的theme(axis.text=
参数可以满足您的需求:
library(ggplot2)
library(lubridate)
s <- c(320,790,810,820,780,780,680,700,600,380,420,620,310)
d <- seq(ymd('2016-03-01'),ymd('2017-03-01'), by = '1 month')
df <- data.frame(Date=d,No.Sales=s)
ggplot(df) + geom_bar(aes(Date,No.Sales),stat="identity") +
theme_bw() +
labs(title="Condo Sales",
subtitle="Montly counts of condo sales in Toronto") +
theme(panel.border = element_blank(),
axis.text=element_text( hjust=1) )
产量: