Dear Madame or Sir,

in my current project, I have so far used a lot of very different plots. I am 
now trying to gain informatin with the help of parallel coordinate plots. 
Therefore, I use the function "parcoord" of the MASS package. What I would like 
to do, is to color let's say the points according to the first half of rows of 
a specific matrix/dataframe in a color different from the color according to 
the second half of rows (resp. coordinates).

For example:

Assume, table is a matrix/dataframe with nrow(table) = 20, I would like to 
generate a parcoord plot  and color points of table[1:10,] in green and 
table[11:20,] in yellow. The background is, that I have two (or more) datasets 
to be analyzed and I thought it would be much more efficient and easier in 
general to merge them into one big table (please let me know, if you have any 
idea better from that). With an ordinary 2d scatterplot, I could do something 
like:

plot(table[1:10,1], table[1:10,2])
# and then add the rest by means of points 
points(table[11:20,1] , table[11:20,2])

which makes it easy to write various own functions. However, this is the goal: 
seperate objects according to their (row- or even column-)position.

I tried something like

library(MASS)
parcoord(table[,c(1,2)], col = c("green", "yellow"))

but as I figure out, the colors of the lines/points plotted, alternate, meaning 
all points referring to uneven rownumbers are colord in green and respectivley 
all even rownumbers in yellow. Same with three or more colors; it just 
continously goes through the vector of colors, right?
Acoordingly, my questions concerns on how the plot function uses col and if 
there is any way to "manipulate". 
I looked up the api of plot and matplot, but I was not able to find a general 
enough defnition or explanation of the option "col", sorry.

Kind regards and thank you for your response in advance,
-Patrick Grossmann


  --
  
Patrick Großmann - HiWi zur Netzwerkdokumentation
  
Network Operation Center    NOC
  
Hochschulrechenzentrum    HRZ    Universität Bielefeld
  

  
Büro:
  
UHG V0-251
  
Telefon:
  
+49 521 106-12618
  
Fax:
  
+49 521 106-2969 
  
Telefon Sekretariat:
  
+49 521 106-4951
  

  
http://www.uni-bielefeld.de/hrz/


  


        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to