I have been trying to convert POSIXct format so that my date and times would reflect Julian dates.
ind$DateAndTime <- as.POSIXct(ind$DateAndTime, tz = "UTC",
origin = '1970-01-01')
ind$DateAndTime<- format(as.POSIXct(ind_steps$t2),"%y%j")
I had used these two lines of code to do so, but I am now having trouble plotting them using ggplot
.
plot_list[[i]] <- ggplot(ind, aes(x = DateAndTime, y = NSD)) +
geom_line() + theme_bw() +
ggtitle(random_tables[i]) +
theme(axis.text.x = element_text(angle = 90))
When I plot it I get this, where the julian dates are vertical, but they still overlap. I would like to get the graph to show the julian dates more visibly and to show every other julian date so that it isn't so cramped in the x-axis. Is there a way to do this?