Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gabrielburcea/29d42cfec2f27fb0e44ab3d0bddf6ada to your computer and use it in GitHub Desktop.
Save gabrielburcea/29d42cfec2f27fb0e44ab3d0bddf6ada to your computer and use it in GitHub Desktop.
Plots + title and subtitles
plt_month <-ggplot(plt_wkd_mean, aes(x = Weekday, y = Average))
plt_month + geom_bar(stat = "identity", position = "identity", alpha = 0.5, width = 0.4, fill= "red") +
#geom_line()+
#geom_point()+
scale_y_continuous(expand = c(0, 0), limits = c(0, 200)) +
xlim("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun") +
labs(title = "Chelsea: Montly Occupancy, 1st of Jan to 31st of Dec 2013",
subtitle = "Average Occupancy (medical patients) by Days of the Week.
Note: results are intended for management information only",
y = "Average - Occupancy", x = "Day of the Week", caption = "CLAHRC - NIHR") + #caption = "Source: Imperial Data Dive - Hackaton") +
theme(axis.title.y = element_text(margin = margin(t = 0, r = 21, b = 0, l = 0)),
plot.title = element_text(size = 12, face = "bold"),
plot.subtitle = element_text(size = 10)) +
theme_bw()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment