Hi all; My native language is spanish and I would need to do two changes in the default xlabels in timeseries plots: 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? b) The xlabs appear in my language for months and days (spanish) but I need them in English, how can I change this setting? Thanks and best regards, Javier
time series plots: labels language & tickmarks
3 messages · javier garcia - CEBAS, Brian Ripley, Gavin Simpson
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.
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.)
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
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. %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%