Skip to content

pairs with label

2 messages · Saurav Pathak, Uwe Ligges

#
Hi,

I have not been able to figure out how to label points on a pairs
(scatter matrix) plot.  That is, I wish all points on a scatter
matrix to be labeled by a number.  I can do that for a simple plot
using the text() command:

plot(data.2d, type="n")
text(data.2d, labels=the.labels)

where,
the.labels <- seq(1,20)

How may i get the same labels for something like
pairs(data.4d)

I cannot use the text() command with pairs(), it seems.

Thanks,
Saurav
#
Saurav Pathak wrote:
Define a panel function for pairs(), see ?pairs for details,
such as:

pairs(data.4d, panel = function(x,y) text(x,y, labels=the.labels)))

Uwe Ligges