Well, you can configure it manually, but it's kind of hacks. First, you must use the index so that your observations are numbered from 1 to 188.
input$xaxis <-index(as.Date(rownames(input)))
Then your own code:
p <- ggplot(input) p <- p + geom_segment(aes(x = xaxis, xend = xaxis, y = Low, yend = High), size = 0.50) # body p <- p + geom_segment(aes(x = xaxis - 0.4, xend = xaxis, y = Open, yend = Open), size = 0.90) # open p <- p + geom_segment(aes(x = xaxis, xend = xaxis + 0.4, y = Close, yend = Close), size = 0.90) # close p <- p + scale_y_continuous(scale_y_log10()) + ggtitle("SPY: 2015")
And finally, I looked at the tab where the breaks should be made, and provided these labels manually:
p + scale_x_continuous(breaks=input$xaxis[c(1,62,125,188)], labels=c("jan","apr","jul","oct"))
NOTE HERE that I was lazy and just took the closest date for 1-jan, 1-apr 1-jul and 1-oct, because 1 jan is a holiday, the jan label is below 2-jan. And I put the βoctβ label below below 30 seconds, the last entry in input . You can disable the course as you wish.
Of course, you can automate the tag by adding a tag field with a date and retrieve the month.