I have a plot with an unreadable x scale:
my code is:
library(ggplot2)
print(ggplot(dfComb,aes(x=hrmin,y=count,fill = dfComb$word)) +geom_bar(alpha = 0.5,stat='identity')+
xlab("Minute of Day") +
ylab("Count") +
ggtitle(paste("Frequencies of Tweets by minute from tweetsORC1")) +
scale_fill_hue() +
scale_colour_hue() +
# labs(fill="Word"))
scale_fill_discrete("Word",
breaks=c("A","B"),
labels=c("yes","no" ))+
scale_x_continuous(breaks=seq(00:00, 23:59, 60))
)
AS you can see I have tried limiting the labels (as per this) using
scale_x_continuous(breaks=seq(00:00, 23:59, 60))
But this does not work since my data is of the form:
dput(head(dfComb))
structure(list(hrmin = c("0:00", "0:03", "0:06", "0:08", "0:18",
"0:20"), count = c(1, 1, 1, 1, 1, 1), word = c("B", "B", "B",
"B", "B", "B")), .Names = c("hrmin", "count", "word"), row.names = c(NA,
6L), class = "data.frame")
where hrmin
is of the form HH:MM i.e. the time of day from 0:00 to 23:59. I want labels that only designate each hour so 1 AM to Midnight, there being just 24 labels in total. Any pointers on how to handle this kind of data is much appreciated.