[Rd] patch for graphics/R/plot.R that fixes incorrect tick positions

Sklyar, Oleg (London) osklyar at maninvestments.com
Thu Sep 4 16:27:40 CEST 2008


As I haven't got any replies to my earlier posts about incorrect tick
positions in plot and matplot, here is the simplest patch to correct
this issue (it fixes both plot with xlim/ylim and matplot). The plot.R
was unchanged between 2.7 and current R-devel. It would be great if the
patch could be (tested and) applied to both the current patched and the
current devel versions.

70,71c70,71
<       localAxis(if(is.null(y)) xy$x else x, side = 1, ...)
<       localAxis(if(is.null(y))  x   else y, side = 2, ...)
---
>         localAxis(xlim, side = 1, ...)
>         localAxis(ylim, side = 2, ...)

It works fine with y given or y NULL, which was an issue before when the
above is.null test was introduced about half a year ago to avoid
conversion to double and thus dropping custom Axis methods. The patched
version was tested with custom time/date Axis methods and works fine, as
well as it works fine with POSIXct objects.

Thanks,
Oleg

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}}



More information about the R-devel mailing list