Grokbase Groups R r-help May 2010
FAQ
Hello,

I would like to know how to display values for points in a plot funtion. For
example,

plot( yÚt$a,
xÚt$b,
main="plot1",
ylab="a",
xlab="b",
ylim=c(-10, 10),
xlim=c(-10, 10),
type = "p",
pch,
col=<vector of colors depending on the value of "b">,
cex=1.5
)

How can I add a label to each of points here, if I have a list of values
associated with the point.

Thanks in advance.




--
View this message in context: http://r.789695.n4.nabble.com/How-to-display-data-values-for-points-in-a-plot-tp2197796p2197796.html
Sent from the R help mailing list archive at Nabble.com.

Search Discussions

  • Erik Iverson at May 13, 2010 at 6:58 pm

    Nish wrote:
    Hello,

    I would like to know how to display values for points in a plot funtion. For
    example,

    plot( yÚt$a,
    xÚt$b,
    main="plot1",
    ylab="a",
    xlab="b",
    ylim=c(-10, 10),
    xlim=c(-10, 10),
    type = "p",
    pch,
    col=<vector of colors depending on the value of "b">,
    cex=1.5
    )

    How can I add a label to each of points here, if I have a list of values
    associated with the point.
    Please provide self-contained, reproducible code.

    Maybe ?text is what you want?
  • Jim Lemon at May 14, 2010 at 8:55 am

    Nish wrote:
    ...
    I would like to know how to display values for points in a plot
    funtion. For
    example,
    ...
    How can I add a label to each of points here, if I have a list of values
    associated with the point.
    Hi Nish,
    Have a look at thigmophobe.labels in the plotrix package.

    Jim
  • Greg Snow at May 18, 2010 at 11:35 pm
    It depends on what you mean by display values. In addition to the other suggestions also look at the identify function as well as TkIdentify and HTKidentify in the TeachingDemos package.

    --
    Gregory (Greg) L. Snow Ph.D.
    Statistical Data Center
    Intermountain Healthcare
    greg.snow at imail.org
    801.408.8111

    -----Original Message-----
    From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
    project.org] On Behalf Of Nish
    Sent: Thursday, May 13, 2010 10:33 AM
    To: r-help at r-project.org
    Subject: [R] How to display data values for points in a plot?


    Hello,

    I would like to know how to display values for points in a plot
    funtion. For
    example,

    plot( yÚt$a,
    xÚt$b,
    main="plot1",
    ylab="a",
    xlab="b",
    ylim=c(-10, 10),
    xlim=c(-10, 10),
    type = "p",
    pch,
    col=<vector of colors depending on the value of "b">,
    cex=1.5
    )

    How can I add a label to each of points here, if I have a list of
    values
    associated with the point.

    Thanks in advance.




    --
    View this message in context: http://r.789695.n4.nabble.com/How-to-
    display-data-values-for-points-in-a-plot-tp2197796p2197796.html
    Sent from the R help mailing list archive at Nabble.com.

    ______________________________________________
    R-help at r-project.org mailing list
    https://stat.ethz.ch/mailman/listinfo/r-help
    PLEASE do read the posting guide http://www.R-project.org/posting-
    guide.html
    and provide commented, minimal, self-contained, reproducible code.
  • Daltieri at Apr 27, 2012 at 2:21 pm
    See

    ?text

    Hope it works for you.

    --
    View this message in context: http://r.789695.n4.nabble.com/How-to-display-data-values-for-points-in-a-plot-tp2197796p4592822.html
    Sent from the R help mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupr-help @
categoriesr
postedMay 13, '10 at 4:33p
activeApr 27, '12 at 2:21p
posts5
users5
websiter-project.org
irc#r

People

Translate

site design / logo © 2022 Grokbase