Skip to content
Back to formatted view

Raw Message

Message-ID: <CAKmUXV9v7xaiR9b3tNfBTJLbahAFGySxWXDHjtD4H0M1dgFSHw@mail.gmail.com>
Date: 2016-05-26T14:17:56Z
From: Tom
Subject: Shaded areas in R
In-Reply-To: <CAJAnTBXtLMADaak8JyPcXcJ3WLPPkczyZ+ktvAaXUrDr5p-T4g@mail.gmail.com>

Hi ?scar,

Not really sure what you mean by the time variable being a "character"
vector. Unless you are plotting a barchart or boxplot (or similar), I
don't this this makes sense. If you can post a sample of your data,
preferably using the dput() command we can probably help more.

On Thu, May 26, 2016 at 5:37 AM, ?scar Jim?nez
<oscar.jimenez.fdez at gmail.com> wrote:
> Hello,
>
> I'm working with R language, and plotting some parameters over time. I need
> to draw a shaded area under the curve of eacj parameter.
>
> For that, I might use the polygon (x,y) function, assigning coordinates
> (x,y) to each vertex of my polygon. To do so, "x" and "y" must be vectors
> with numerical values, but since my x-axis is a time series, I cannot
> assing a numerical value to my "x" coordinate, because time variable is a
> "character" variable.
>
> Is there any option to use the function polygin (x,y) in this case, or any
> other function that allows me to draw a shaded area under the curve on a
> time series basis?
>
> Thank you in advance for your help
>
> Best regards
>
> ?scar
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.