简单使用
scale_x_date
而不是
scale_x_continuous
ggplot(cig_prophet_states, aes(date, actuals_vol)) +
geom_area(fill='#114365') +
facet_geo(~ geo, grid = "us_state_grid2", label="name") +
scale_x_date(labels = function(x) paste0("'", substr(x, 3, 4))) +
labs(title = "GDP by State 1997-2016 ($, trillions)",
caption = "Data Source: St. Louis FRED",
x = "Year",
y = "volume") +
theme(strip.text.x = element_text(size = 8))