Hi, I am working on making a graph of spawning stock biomass for spiny dogfish over time. Throughout my timeline, quotas have changed and I wanted to indicate those years along the line graph by changing colors of portions of the graph. So far, I just added a column with the quota status and had it set by color, but it gives me a broken up graph. I was wondering if someone knew of a way to join all the pieces, or if there was an alternate way to do this whole thing.
Thanks in advance for any advice!
YEAR | AVERAGE FEMALE SSB | QUOTA STATUS |
---|---|---|
1982 | 275.1 | None |
1983 | 266.1 | None |
1984 | 215.8 | None |
1985 | 170.1 | None |
1986 | 208 | None |
1987 | 242.5 | None |
1988 | 281.2 | None |
1989 | 271.5 | None |
1990 | 331.8 | None |
1991 | 260.9 | None |
1992 | 300.4 | None |
1993 | 245.2 | None |
1994 | 206.8 | None |
1995 | 147.5 | None |
1996 | 134.7 | None |
1997 | 127.5 | None |
1998 | 102.3 | None |
1999 | 57.7 | None |
2000 | 58.4 | Coastwide |
2001 | 68.4 | Coastwide |
2002 | 72.5 | Coastwide |
2003 | 65.5 | Regional |
2004 | 60 | Regional |
2005 | 53.6 | Regional |
2006 | 116.6 | Regional |
2007 | 155.8 | Regional |
2008 | 217.7 | State |
2009 | 182.7 | State |
2010 | 183.5 | State |
2011 | 174.2 | State |
2012 | 241.5 | State |
2013 | 235.9 | State |
2014 | NA | State |
2015 | 133.8 | State |
2016 | 154.4 | State |
2017 | 111.1 | State |
2018 | 102.4 | State |
2019 | 82.7 | State |
ggplot(SSB) + (aes(x = YEAR, y = AVERAGE.FEMALE.SSB, color = QUOTA.STATUS )) + geom_line()