[R] various plotting options

Grossmann Patrick patrick.grossmann at bsse.ethz.ch
Wed Mar 23 15:27:09 CET 2011


    Dear R-Project helpdesk member,

I am currently working on some basic correspondence analysis using the R packages 'ca'. As I compute the CA by example <- ca(data), and plotting example via plot(example), I am trying to figure out, how to get a certain desired plot, so, however, my question could be of more general nature.

This probably might not be new to you, but the plotting the result of ca will return a plot, with red points (triangles if I remember correctly) labeled with the column names of the original table read in, and blue dots for the row names. What I essentially need to solve is, to make a plot, which differs in the visualization of the rows. The labels of the rows should not be displayed at all, plus, certain rows must have a different color of other rows. Of course, I looked up several manuals and threads already, but unfortunatly I was not able to get very far beyond "plot(example, labels=0)".

So let us say, I have a table, which looks like this
a b c d
a 1 2 3
b 4 5 6
c 7 8 9
d 0 1 2

with a b c d being the header, and the row.names=1, what I practically need is a plot, that displays the column names attached as labels to the corresponding dots/triangles (which is the default case), and the dots referring to the rows without(!) any labels, PLUS  the points corresponding to the first two rows (a=1 2 3, b = 4 5 6) in a different color (really does not matter which) than the points corresponding to the last two ones (c = 7 8 9, d = 0 1 2).

I deeply hope, that you are able to help me; if I can help you considering the formulation of my question, please feel free, to contact me.

With kind regards, I appreciate your work,
-Patrick Grossmann



More information about the R-help mailing list