Skip to content
Prev 267917 / 398502 Next

Creating a scatterplot with sequential dates on x-axis?

Hi Caitlin,

Here are a couple of options for you:

plot(x = seq(from = as.Date("2011-05-01"), to = as.Date("2011-05-30"),
by = "day"),
     y = cumsum(runif(30)))

## using a bit of a shortcut
plot(x = as.Date("2011-05-01") + 0:29,
     y = cumsum(runif(30)))

Does that do what you want?

Josh
On Sun, Aug 7, 2011 at 5:00 PM, Caitlin <bioprogrammer at gmail.com> wrote: