I did this with points by supplying the vector in the col= argument.

That is, 

 plot(x=x.vector,y=y.vector,col=col.table[y.vector*100+100],pch=16)

It is presumed, that col.table contains 200 colors, and y.vector is in (-1,1) 
range. You can write your own expression to define the color for particular 
value, depending on your task.

pch=16 - afair, it is a big solid square (may be wrong)

colors in table should be as character hexadecimal strings of the form 
"#rrggbb".

Did you define the palette?

Some cute color tables could be grabbed from here
http://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml

Also, the GIMP (http://www.gimp.org) can generate palettes and even saves them 
in the text files, which can be very easily imported in R.

______________________________________________
[email protected] 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