Hey guys so this is what my data looks like:
data <- read.table(text ="
Call_Type, Violation_Type, Monthly_Average_Violations
Traditional, Total, 4.472
Traditional, Shift Length, 0.222
Traditional, Days Off, 2.667
Traditional, 80 Hour Week, 1.556
Nightfloat, Total, 5.417
Nightfloat, Shift Length, 0.000
Nightfloat, Days Off, 4.194
Nightfloat, 80 Hour Week, 1.167",
header = TRUE,
sep = ",")
And then I am using this to plot:
ggplot(data, aes(x = Violation_Type,
y = Monthly_Average_Violations,
fill = Call_Type)) +
geom_bar(stat = "identity", position = "dodge") +
theme(axis.text.x = element_text(angle = 90))
I apparently cannot embed pictures yet. I want to put the traditional bins first and I want them green, and the nightfloat bins second and I want them pink. Any help would be greatly appreciated.