From osklyar at maninvestments.com  Thu Sep  4 13:04:27 2008
From: osklyar at maninvestments.com (Sklyar, Oleg (London))
Date: Thu, 4 Sep 2008 12:04:27 +0100
Subject: [Rd] "incorrect" ticks in plot(with xlim/ylim) and matplot in
 R2.7.2, R2.8.0
In-Reply-To: <18623.43310.215051.805170@stat.math.ethz.ch>
References: <1A68FCB28DE72F4BA3B967E6506CCE43030496FB@mildnpexmb01.maninvestments.ad.man.com>
	<18623.43310.215051.805170@stat.math.ethz.ch>
Message-ID: <1A68FCB28DE72F4BA3B967E6506CCE4303049702@mildnpexmb01.maninvestments.ad.man.com>

Dear Martin,

I understand the reasons behind PDF removal, but I actually added a
description of the problem with R2.7+ before... (I cannot select which
email client I use in the office).

Now the problem remains and here is the illustration. The reason for
setting xlim beyond the data range can be e.g. that more data are added
afterwards:

plot(c(-5,5),1:2, xlim=c(-10,10))

R2.6.1 outputs X axis ticks correctly as in:

+--- (-10) --------- (-5) --------- (0) --------- (5) --------- (10)
---+

R2.8.0 and R2.7.2 patched output X-axis ticks "incorrectly" as in the
following illustration (well, the ticks are correct, but the plots are
ugly because ticks do not cover the whole range requested):

+------------- (-6) - (-4) - (-2) - (0) - (2) - (4) - (6)
--------------+

Also, try the following code in R2.6.1 and R2.7+:

m = matrix(c(-0.033, 0.009, 0.064, 0.050, 0.097,
    -0.008, 0.037, 0.070, 0.060, 0.077,
    -0.027, 0.051, 0.060, 0.106, 0.049,
    -0.068, -0.009, 0.095, 0.091, 0.125,
    -0.065, 0.013, 0.062, 0.111, 0.080), ncol=5, byrow=TRUE)

plot(c(-5,5),c(0,10),xlim=c(-10,10),ylim=c(-5,15))
x11(); matplot(m)


Here are the seesionInfo's:

-----------------------------------------------------------------
R version 2.8.0 Under development (unstable) (2008-08-05 r46234) 
x86_64-unknown-linux-gnu 

locale:
C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

-----------------------------------------------------------------
R version 2.7.2 Patched (2008-08-26 r46442) 
x86_64-unknown-linux-gnu 

locale:
C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base 

-----------------------------------------------------------------
R version 2.6.1 (2007-11-26) 
x86_64-unknown-linux-gnu 

locale:
C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base


loaded via a namespace (and not attached):
[1] rcompgen_0.1-17


Dr Oleg Sklyar
Technology Group
Man Investments Ltd
+44 (0)20 7144 3803
osklyar at maninvestments.com 



**********************************************************************
The contents of this email are for the named addressee(s...{{dropped:22}}



[Rd] "incorrect" ticks in plot(with xlim/ylim) and matplot in R2.7.2, R2.8.0
Sklyar, Oleg (London