Re: [Rd] Overriding axis formatting with custom Axis method, Axis.numeric etc

2008-04-07 Thread Prof Brian Ripley
On Mon, 7 Apr 2008, Sklyar, Oleg (MI London) wrote: > Dear Prof Ripley, > > thank you for your suggestions, they are as always very insightful! > Although, anybody can miss a point or two as I just did in namespaces. > Is the following correct? > > Until redefined in the current namespace, plot.de

Re: [Rd] Overriding axis formatting with custom Axis method, Axis.numeric etc

2008-04-07 Thread Sklyar, Oleg (MI London)
Dear Prof Ripley, thank you for your suggestions, they are as always very insightful! Although, anybody can miss a point or two as I just did in namespaces. Is the following correct? Until redefined in the current namespace, plot.default (and all other plot.* methods) being defined in 'graphics'

Re: [Rd] Overriding axis formatting with custom Axis method, Axis.numeric etc

2008-04-07 Thread Gabor Grothendieck
Try this: Axis.AsIs = AxisFUN = function(x=NULL, at=NULL, ..., side, labels=TRUE) { if (is.null(at)) at = pretty(x) axis(at=at, ..., side=side, labels=labels, col="red", lwd=5) } plot(I(1:10)) On Mon, Apr 7, 2008 at 7:22 AM, Sklyar, Oleg (MI London) <[EMAIL PROTECTED]> wrote: > Dear list:

Re: [Rd] Overriding axis formatting with custom Axis method, Axis.numeric etc

2008-04-07 Thread Prof Brian Ripley
On Mon, 7 Apr 2008, Sklyar, Oleg (MI London) wrote: > Dear list: > > I would like to override the default way R formats plot axes with a > custom method(s). Obviously I would prefer to define it as general as > possible avoiding writing a custom method for each individual class > where possible. >

Re: [Rd] Overriding axis formatting with custom Axis method, Axis.numeric etc

2008-04-07 Thread Henrique Dallazuanna
I think that you can change the axis as a argument in plot: custom.axis <- bquote({axis(1, col="red", lwd=5) axis(2, col="red", lwd=5)}) suppressWarnings(plot(1:5, 1:5, frame.plot = eval(custom.axis))) suppressWarnings(plot(1:5, frame.plot = eval(custom.axis)))