Hi everyone, I have a time series data set and I want to fill my line plot of this time series with different colors e.g I want to fill portion related to 1995-1996 with blue , portion related to 1996-1997 with orange and then portion related to 1997-1998 with red can anyone please help me. [[alternative HTML version deleted]]
First, you need to follow the posting guide ... compose a self-contained example R code including sample data that is at least representative of your actual data. This will eliminate many possible misunderstandings and most likely will lead to a more rapid response to your query. --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity. Akhil dua <akhil.dua.12 at gmail.com> wrote:>Hi everyone, > >I have a time series data set and I want to fill my line plot of this >time >series with different colors > >e.g >I want to fill portion related to 1995-1996 with blue , portion related >to >1996-1997 with orange and then portion related to 1997-1998 with red > > >can anyone please help me. > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.
On Aug 6, 2012, at 10:46 PM, Akhil dua wrote:> Hi everyone, > > I have a time series data set and I want to fill my line plot of > this time > series with different colors > > e.g > I want to fill portion related to 1995-1996 with blue , portion > related to > 1996-1997 with orange and then portion related to 1997-1998 with redTake a look at the plotrix package. It has a variation of the `segments` function that supports varying colors. -- David Winsemius, MD Alameda, CA, USA