Hi. I am having trouble getting my x axis worked out on this graph. It is a nine day period with 24 hours in each, split in to half hour ticks. I was hoping to just have every two hours marked off on the x axis to clear space and make it possible to read. I have tried a few different options (pretty:breaks and scale_x_continous) to get it worked out, but I keep getting errors. Would appreciate any suggestions.
DATA:
data.frame(
stringsAsFactors = FALSE,
DAY_NUM = c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2),
TIME = c("22:00",
"22:30","23:00","23:30","23:30","0:00",
"0:00","0:30","0:30","1:00"),
Treatment = c("FOUR",
"FOUR","FOUR","FOUR","ONE","FOUR","ONE",
"FOUR","ONE","FOUR"),
Mean = c(0,0,0,
4.09090909090909,2.45454545454545,0,2,0,
0.272727272727273,0)
PLOT CODE:
circa_plot <- ggplot(ALL_DATA, aes(x = TIME, y = Mean, col = Treatment, group = Treatment))+
geom_line(show.legend = FALSE) +
facet_grid(Treatment~DAY_NUM, scales = "free_y") +
labs(x = "Time", y = "Mean Number of Hops") +
theme_minimal()
circa_plot
PLOT.pdf (25.1 KB)