Skip to content
Back to formatted view

Raw Message

Message-ID: <CC9DB259-07B5-4626-BF8B-EEF67ED8D35E@comcast.net>
Date: 2012-08-07T19:52:07Z
From: David Winsemius
Subject: shading line plot
In-Reply-To: <CAPSaRtAoXxn-dEyGTp9+THVXhDgDN_046qtOG0MsUSNJe+D4-Q@mail.gmail.com>

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 red

Take a look at the plotrix package. It has a variation of the  
`segments` function that supports varying colors.

-- 

David Winsemius, MD
Alameda, CA, USA