labelling dots in plots

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

labelling dots in plots

Anne Katrin Heinrichs
Hello,

I would like to label outliers (or all dots) in a plot

plot(as.matrix(ValAddInd_byYear), as.matrix(Cons_Elec_Ind_byYear))

ideally by the 30 different row.names, but anything else (x or y values, for example)
would already be helpful.
I've tried various things with pch, but they didn't work and I can't find anything else.

Any hint appreciated!
Thanks,

Katrin

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: labelling dots in plots

Francisco J. Zagmutt
Take a look at ?identify

Francisco


>From: "Anne Katrin Heinrichs" <[hidden email]>
>To: <[hidden email]>
>Subject: [R] labelling dots in plots
>Date: Wed, 15 Feb 2006 18:43:20 +0100
>
>Hello,
>
>I would like to label outliers (or all dots) in a plot
>
>plot(as.matrix(ValAddInd_byYear), as.matrix(Cons_Elec_Ind_byYear))
>
>ideally by the 30 different row.names, but anything else (x or y values,
>for example)
>would already be helpful.
>I've tried various things with pch, but they didn't work and I can't find
>anything else.
>
>Any hint appreciated!
>Thanks,
>
>Katrin
>
>______________________________________________
>[hidden email] mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide!
>http://www.R-project.org/posting-guide.html

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: labelling dots in plots

Robert Baer
In reply to this post by Anne Katrin Heinrichs
Is this something like what you want?

# make test data
x=1:10;  y=x;  names(y)=letters[1:length(y)]
# Now plot
plot(x, y, pch='', xlab='ValAddInd_byYear',  ylab='Cons_Elec_Ind_byYear')
text(x,names(y),1:length(x),cex=0.6)



HTH,
Rob

____________________________
Robert W. Baer, Ph.D.
Associate Professor
Department of Physiology
A. T. Still University of Health Science
800 W. Jefferson St.
Kirksville, MO 63501-1497 USA
----- Original Message -----
From: "Anne Katrin Heinrichs" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, February 15, 2006 11:43 AM
Subject: [R] labelling dots in plots


> Hello,
>
> I would like to label outliers (or all dots) in a plot
>
> plot(as.matrix(ValAddInd_byYear), as.matrix(Cons_Elec_Ind_byYear))
>
> ideally by the 30 different row.names, but anything else (x or y values,
for example)
> would already be helpful.
> I've tried various things with pch, but they didn't work and I can't find
anything else.

>
> Any hint appreciated!
> Thanks,
>
> Katrin
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html