[R] User defined axis on image plots
Mark Myatt
mark at myatt.demon.co.uk
Fri Nov 2 10:31:43 CET 2001
Mark Scarr <mscarr at excitehome.net> writes:
>Hi All,
>
>As a newbie to R I have the following question, which I couldn't
>find an answer to in the documentation.
>
>I have an x, y, z image plot of some data, where x and y are vectors
>of the form x = c(1:nrow(z)), y = (1:ncol(z)). As a result this places
>integer values on the X-axis, whereas they are in fact dates. I have
>another string vector of dates which I would like to use on the X-axis
>instead, suitably spaced and preferably vertical (rather than horizontal).
>
>Any help would be most appreciated,
Plot without axes (i.e. use axes = FALSE) in the plot() function and
then add the axes:
axis(side = 1, labels = YourLabelVar)
axis(side = 2)
Changing label orientation can be done with par(las = 2) for
perpendicular labels, par(las = 3) for vertical labels. Remember to use
the par() function prior to the plot() function.
I cover this with a few examples in me R-Notes at:
http://www.myatt.demon.co.uk
Mark
--
Mark Myatt
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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