I have a simple (yet very large) data set of counts made at different sites from Apr to Aug. Between mid Apr and July there are no zero counts - yet a line at zero extends from the earliest to latest date.
Here is the part of the data used to make the above chart (columns are- Site.ID, DATE, Visible Number):
data=structure(list(Site.ID = c(302L, 302L, 302L, 302L, 302L, 302L, 302L, 302L, 302L, 302L, 302L, 302L, 304L, 304L, 304L, 304L, 304L, 304L, 304L, 304L, 304L, 304L, 304L, 304L), DATE = structure(c(1L, 2L, 5L, 3L, 4L, 6L, 8L, 7L, 9L, 10L, 11L, 12L, 1L, 2L, 5L, 3L, 4L, 6L, 8L, 7L, 9L, 10L, 11L, 12L), .Label = c("3/21/2014", "3/27/2014", "4/17/2014", "4/28/2014", "4/8/2014", "5/13/2014", "6/17/2014", "6/6/2014", "7/10/2014", "7/22/2014", "7/29/2014", "8/5/2014" ), class = "factor"), Visible.Number = c(0L, 0L, 5L, 14L, 20L, 21L, 6L, 8L, 0L, 0L, 0L, 0L, 0L, 0L, 2L, 7L, 7L, 7L, 7L, 5L, 0L, 0L, 0L, 0L)), .Names = c("Site.ID", "DATE", "Visible.Number" ), class = "data.frame", row.names = c(NA, -24L))
attach(data)
DATE<-as.Date(DATE,"%m/%d/%Y")
plot(data$Visible.Number~DATE, type="l", ylab="Visible Number")
I have two sites but there are three lines. How to make R not plot a line along zero? Thank you for your help!