[R] X-axis range
David Winsemius
dwinsemius at comcast.net
Tue Sep 15 15:24:36 CEST 2009
I suspect that your explanation is true, but the ambiguity of what
format you might be using is the reason that the Posting Guide asks
that posters offer a reproducible example.
--
David
On Sep 15, 2009, at 12:57 AM, Chris Li wrote:
>
> Thanks Peter.
>
> I have tried your approach, and it does not work. I guess it is
> because the
> format of the x-axis (and its associated data) has the format of
> date while
> numbers like 1998, 2003 etc. are treated as numeric (i.e. not the date
> format).
>
> Thank you for your time anyway. :)
>
> Cheers,
> Chris
>
>
> Peter Alspach-2 wrote:
>>
>> Tena koe Chris
>>
>> ?axis
>>
>> e.g.,
>> plot(yourX, yourY, xlim=c(1998,2008), xaxt='n')
>> axis(1, c(1998,2003,2008))
>>
>> HTH ....
>>
>> Peter Alspach
>>> -----Original Message-----
>>> From: r-help-bounces at r-project.org
>>> [mailto:r-help-bounces at r-project.org] On Behalf Of Chris Li
>>> Sent: Tuesday, 15 September 2009 3:22 p.m.
>>> To: r-help at r-project.org
>>> Subject: [R] X-axis range
>>>
>>>
>>> Hi all,
>>>
>>> I would like to change the x-axis of my graphs from year 1998
>>> to 2008 with an interval of 5 (i.e. 1998, 2003, 2008). Any
>>> help would be greatly appreciated.
>>>
>>> http://www.nabble.com/file/p25447219/model_hydrographs.txt
>>> model_hydrographs.txt
>>> http://www.nabble.com/file/p25447219/bore_sample.txt
>>> bore_sample.txt
>>> http://www.nabble.com/file/p25447219/46871a%2Bcalibration%2Bscript.R
>>> 46871a+calibration+script.R
>>>
>>> Cheers,
>>> Chris
>>> --
>>> View this message in context:
>>> http://www.nabble.com/X-axis-range-tp25447219p25447219.html
>>> Sent from the R help mailing list archive at Nabble.com.
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> 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.
>>>
>>
>> ______________________________________________
>> 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.
>>
>>
>
> --
> View this message in context: http://www.nabble.com/X-axis-range-tp25447219p25447800.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
More information about the R-help
mailing list