Re: [R] time series plots: labels language & tickmarks

From: Gavin Simpson <gavin.simpson_at_ucl.ac.uk>
Date: Mon 22 Aug 2005 - 22:39:54 EST

On Mon, 2005-08-22 at 13:04 +0100, Prof Brian Ripley wrote:
> On Mon, 22 Aug 2005, javier garcia - CEBAS wrote:
>
> > My native language is spanish and I would need to do two changes in the
> > default xlabels in timeseries plots:
>
> What sort of plots are you talking about here? (Not tsplot or plot.ts,
> for example.) I think you are perhaps talking about plots of Dates.
>
> > a) For timeseries that span more than one year, there are just xlabs and
> > tickmarks for the beginning of each year. Could I add extra tick marks for
> > each month easily?
>
> See ?axis.Date, if this is about Dates.

If you want the ticks for months unlabelled, then axis.Date() in R v. 2.1.1 and 2.1.1-patched won't allow this. axis.Date() from R-devel allows you to suppress the labelling of ticks - the change is trivial so you could get the src of axis.Date for R-devel (e.g. it is here in the subversion tree:

https://svn.r-project.org/R/trunk/src/library/graphics/R/datetime.R

and use that to create a my.axis.Date() and use this function explicitly to add axes to your plot for the monthly ticks - until R 2.2.0 is released anyway - using argument labels = FALSE to suppress the labels for the monthly ticks.

HTH G

>
> > b) The xlabs appear in my language for months and days (spanish) but I need
> > them in English, how can I change this setting?
>
> Use R in an English locale. (If as the posting guide asked you have told
> us your platform we could have told you how. If you had shown us some
> reproducible code we would not have had to guess as to what you want to
> do.)
>

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [T] +44 (0)20 7679 5522
ENSIS Research Fellow             [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC                 [E] gavin.simpsonATNOSPAMucl.ac.uk
UCL Department of Geography       [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way                    [W] http://www.ucl.ac.uk/~ucfagls/
London.  WC1H 0AP.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Mon Aug 22 22:44:00 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:40:54 EST