[R] axis function

zivan.karaman@limagrain.com zivan.karaman at limagrain.com
Thu May 25 11:15:35 CEST 2000


In S-PLUS, the 'axis' function accepts some arguments that don't exist in the R
counterpart.

The two that I'm interested in right now are 'pos' and 'ticks'.

Any suggestions on how obtain the same result with R?

As a reminder, copy of the S-PLUS help page.

USAGE

axis(side, at=<<see below>>, labels=T, ticks=T, distn=NULL, line=0, pos=<<see
below>>, outer=F)

REQUIRED ARGUMENTS

side a number representing the side of the plot for the axis (1 for bottom, 2
for left, 3 for top, and 4 for right).

OPTIONAL ARGUMENTS

at   vector of positions at which the ticks and tick labels will be plotted.  If
side is 1 or 3, at represents x-coordinates.  If side is 2 or 4, at represents
y-coordinates.  If at is omitted, the current axis (as specified by the xaxp or
yaxp parameters, see par) will be plotted.

labels    if labels is logical, it specifies whether or not to plot tick labels.
Otherwise, labels must be the same length as at, and label[i] is plotted at
coordinate at[i].

ticks     if TRUE, tick marks and the axis line will be plotted.

distn     character string describing the distribution used for transforming the
axis labels.  The only choice is distn="normal", in which case values of at are
assumed to be probability levels, and the labels are actually plotted at
qnorm(at).  This also implies a reasonable default set of values for the at
argument. By default the values in at are used as the labels.

line distance from the plot (measured out from the plot in units of
standard-sized character heights) at which the axis line will be plotted. Tick
labels will be plotted relative to this position using the graphical parameter
mgp).

pos  x- or y-coordinate position at which the axis line should be plotted.
Labels will be on the side of the axis specified by side.  If pos is omitted,
argument line controls positioning of the axis.

outer     if TRUE, the axis will be drawn in the outer margin rather than the
standard plot margin.


TIA.

Zivan Karaman


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list