Drop the missing values (NA) and use the group
aesthetic, see this example
library(tidyverse)
SSB <- data.frame(
stringsAsFactors = FALSE,
YEAR = c(1982,1983,1984,1985,
1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,
1996,1997,1998,1999,2000,2001,2002,2003,2004,
2005,2006,2007,2008,2009,2010,2011,2012,2013,
2014,2015,2016,2017,2018,2019),
AVERAGE.FEMALE.SSB = c(275.1,266.1,215.8,170.1,
208,242.5,281.2,271.5,331.8,260.9,300.4,245.2,
206.8,147.5,134.7,127.5,102.3,57.7,58.4,68.4,
72.5,65.5,60,53.6,116.6,155.8,217.7,182.7,183.5,
174.2,241.5,235.9,NA,133.8,154.4,111.1,102.4,
82.7),
QUOTA.STATUS = c("None","None","None",
"None","None","None","None","None","None","None",
"None","None","None","None","None","None","None",
"None","Coastwide","Coastwide","Coastwide",
"Regional","Regional","Regional","Regional","Regional",
"State","State","State","State","State","State",
"State","State","State","State","State","State")
)
SSB %>%
drop_na(AVERAGE.FEMALE.SSB) %>%
ggplot(aes(x = YEAR, y = AVERAGE.FEMALE.SSB, color = QUOTA.STATUS, group = 1)) +
geom_line()
Created on 2020-11-14 by the reprex package (v0.3.0.9001)
NOTE: Please notice the way I'm sharing the sample data, next time try to provide a proper REPRoducible EXample (reprex) illustrating your issue.