I'd like to create a biplot
for a prcomp
primary component analysis. However, since I have lots of rows in my matrix, I don't want to print all these labels. I'm mostly concerned in the overall distribution, not in all the details. So I'd like to only represent the data points as dots, without labels. How can I do this?
Right now I do something like this:
biplot(prcomp(data, scale.=T), xlabs=rep(".", nrow(data)))
But I'm concerned that this is using the character '.'
which will be located at the baseline of the text, and as such a slight way off from where the point is actually supposed to be, thus giving an overall shifted appearance. Is this concern justified? How can this be avoided? Is there a simpler alternative?
Bonus points for any solution which labels outliers far from the center of the diagram, in addition to dots everywhere. But that does sound tricky.
Looking at stats:::biplot.default
, and how it calls plot(x, type = "n", …)
, it might well be that plotting the points themselves is not intended, so I fear that what I'm asking for might even be impossible. But perhaps there is a trick of some kind to work around this.