Re: [R] pb with Date format using filled.contour

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed, 02 Mar 2011 11:14:19 +0000 (GMT)

On Wed, 2 Mar 2011, Xavier Bodin wrote:

> Hi R-help community,
>
> Can anyone tell me why, while using :
> x <- seq(as.Date("2001-01-01"),as.Date("2001-01-01") +
> nrow(volcano)-1,1)
> y <- seq(1, ncol(volcano),1)
>
> when I plot the volcano matrix with that command :
> filled.contour(x,y,volcano)
> the graph has a Date format on X-axis, ok ...
>
> ... but when adding a contour plot to the filled contour, using this
> command:
> filled.contour(x,y,volcano,
> plot.axes={axis(1);axis(2);contour(x,y,volcano, add = TRUE)})
> the Date format doesn't appear anymore ... ??

You should not use using axis(1). Look at the code for filled.contour:

     if (missing(plot.axes)) {
         if (axes) {
             title(main = "", xlab = "", ylab = "")
             Axis(x, side = 1)
             Axis(y, side = 2)
         }
     }

and then at the help for Axis and axis.

> Thanks in advance for any help,
>
> Xavier

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
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.
Received on Wed 02 Mar 2011 - 11:31:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 02 Mar 2011 - 12:20:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive