[R] Text Labels on plots in R

David Barron david.barron at jesus.ox.ac.uk
Wed Apr 3 13:07:17 CEST 2002


This should do what you want:

plot(x,y,axes=FALSE)
axis(1,at=1:5,labels=c("Dave","Tim","Ian","Steve","Paul"))
axis(2)

David

----- Original Message -----
From: "Danny Ruttle" <danny at intuitivemedia.com>
To: <r-help at stat.math.ethz.ch>
Sent: Wednesday, April 03, 2002 11:59 AM
Subject: [R] Text Labels on plots in R


> Hi
>
> Is it possible to plot values against strings, i.e. the x axis has
people's
> names and the
> y axis as values, as shown below:
>
>
> 5    x
> 4           x                        x
> 3                    x
> 2                            x
> 1
> 0
>      Dave  Tim    Ian   Steve  Paul
>
> Sorry if this illustration is a little primitive, but I think it gets the
> point across.
>
> regards
> Danny
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-
> 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
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._
>
>

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