From murdoch at stats.uwo.ca  Tue Apr 22 19:45:01 2008
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Tue, 22 Apr 2008 13:45:01 -0400
Subject: [Rd] plot(x) in 2.7.0 (with y=NULL) proposed code correction
In-Reply-To: <1A68FCB28DE72F4BA3B967E6506CCE430229488C@mildnpexmb01.maninvestments.ad.man.com>
References: <1A68FCB28DE72F4BA3B967E6506CCE4302294889@mildnpexmb01.maninvestments.ad.man.com>
	<18446.6246.920108.375163@stat.math.ethz.ch>
	<1A68FCB28DE72F4BA3B967E6506CCE430229488C@mildnpexmb01.maninvestments.ad.man.com>
Message-ID: <480E241D.3050509@stats.uwo.ca>

On 4/22/2008 1:37 PM, Sklyar, Oleg (MI London) wrote:
> To Martin:
> 
> sorry, you are right, my fault. Your SVN fix for axisLocal seems to
> solve the problems for numerics.
> However, the problem remains for POSIXct:
> 
> plot(Sys.time()+runif(100,1,7200))
> 
> (for me it plots time on y correctly, but labeling of index x axis and
> xlab="Index" are wrong/missing). I would assume that there is therefore
> a problem in the current plot.POSIXct function. 
> 
> In fact, if one simply sets: plot.POSIXct = plot.default the result IS
> correct! This is probably because POSIXct is numeric internally and axis
> handling is performed correctly by your fix, i.e. strictly there is no
> need for plot.POSIXct. For plot.POSIXlt, one could simply convert x into
> POSIXct and call the default.
> 
> I do not think there will be many more "standard R" examples because the
> problem was about calling one of the Axis.* methods and those are
> defined for POSIX and Date classes only.
> 
> To Duncan:
> 
> I would be happy if I could test it before, I have recently started at
> the current position and even now cannot access the R SVN directly due
> to the company's internet connection policy.

We do have daily binary builds, you don't need svn access.  I don't know 
if your company policy would allow you to download and install them, of 
course.  But if your company policy is not to allow you to test software 
that matters to the company, then you may have bigger problems than bad 
axis labels.

Duncan Murdoch

> 
> The above working correctly for POSIXct with plot.default and not
> working with plot.POSIXct was exactly the reason, why for me it is
> logical to define Axis.MyClass rather than plot.MyClass.
> 
> 
> Dr Oleg Sklyar
> Technology Group
> Man Investments Ltd
> +44 (0)20 7144 3803
> osklyar at maninvestments.com 
> 
>> -----Original Message-----
>> From: Martin Maechler [mailto:maechler at stat.math.ethz.ch] 
>> Sent: 22 April 2008 17:55
>> To: Sklyar, Oleg (MI London)
>> Cc: R-devel at r-project.org
>> Subject: Re: plot(x) in 2.7.0 (with y=NULL) proposed code correction
>> 
>> >>>>> "OlegS" == Sklyar, Oleg \(MI London\) 
>> <osklyar at maninvestments.com>
>> >>>>>     on Tue, 22 Apr 2008 17:34:24 +0100 writes:
>> 
>>     OlegS> Hi all:
>>     OlegS> following the previous discussion, it looks like 
>> plot(x) with y=NULL
>>     OlegS> still does not work correctly. If one tries for 
>> example plot(1:5) it
>>     OlegS> works, but already for plot(runif(100)) it does not. 
>> 
>> ??? Not for me, with my propsal
>> {{maybe only in your too much modified version of R ??}
>> 
>> I've committed my proposal, and am interested in feedback, 
>> notably additional relevant examples.
>> 
>> Martin
>> 
>>     OlegS> I posted the proposed correction for plot.POSIXct and
>>     OlegS> plot.POSIXlt before. Please voice your opinions
>>     OlegS> whether the following fix for plot.default could be
>>     OlegS> reasonable? I include the full function and the diff.
>> 
>> (And both suffered from wraparounds)
>> 
> 
> 
> **********************************************************************
> The contents of this email are for the named addressee(s) only.
> It contains information which may be confidential and privileged.
> If you are not the intended recipient, please notify the sender
> immediately, destroy this email and any attachments and do not
> otherwise disclose or use them. Email transmission is not a
> secure method of communication and Man Investments cannot accept
> responsibility for the completeness or accuracy of this email or
> any attachments. Whilst Man Investments makes every effort to keep
> its network free from viruses, it does not accept responsibility
> for any computer virus which might be transferred by way of this
> email or any attachments. This email does not constitute a request,
> offer, recommendation or solicitation of any kind to buy, subscribe,
> sell or redeem any investment instruments or to perform other such
> transactions of any kind. Man Investments reserves the right to
> monitor, record and retain all electronic communications through
> its network to ensure the integrity of its systems, for record
> keeping and regulatory purposes. 
> 
> Visit us at: www.maninvestments.com
> 
> **********************************************************************
>



[Rd] plot(x) in 2.7.0 (with y=NULL) proposed code correction
Duncan Murdoch