Hi, 

I want to do a plot from a variable (which i select from a listbox) with the
color factor of the variable that i have selected from another listbox.

To be not very heavy pasting all the code, i will only paste real important
parts:

"data1" and "data2" are the extacted parts of the dataframes "data" from a
tcltk listbox:

data1<<- dataframe[as.numeric(tkcurselection(tl))+1]
data2<<- dataframe[as.numeric(tkcurselection(tl))+1]

As i want to plot the data1 with the color of data2, i use this code:

plot(data1,col=colnames(data2))

This works perfect for plotting the data1 variable, but it do not change the
col of the dots by data2. 

I also have probed with 

plot(data1,col=factor(colnames(data2)))

But nothing happens with the color. 

Thanks!!






--
View this message in context: 
http://r.789695.n4.nabble.com/R-GUI-plot-by-color-tp4710297.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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