[R] Overlapping Plot Labels and Color Palette

Brock Tibert btibert3 at yahoo.com
Tue Dec 1 03:56:09 CET 2009


Hi all,

I am new to R, but with the help I have received thus,I have already been able to work through a bunch of questions on my own in just a few days.  I imagine my questions are relatively simple, but here she goes.  

1) I am using a package where one of the objects generated represents X/Y coordinates for each observation.  I have been able to plot my row names onto the graph using text() (with the help of this list), but because it is entirely possible for some rows to have the same X/Y coordinates, I need to separate the data labels so that I can clearly see each.

I tried text(jitter(coordinates), labels = abbreviate(rownames(dataset), minlength=3)), but it appears that jitter effect is the same for each x/y pair and not unique to each row.

2) I want to vary the color palette.  In the package help, it discusses the ability to change it, but never mentions anything about what my options are, other than showing "rainbow" in the documentation.  I tried to use one from RColorBrewer, but the package does not appear recognize it.  How can I find out what palettes exist and, if possible, how can I create my own?  The palette I wanted was diverging Greys from RColorBrewer

I have made the assumption that the package I am using doesn't matter, but I am using the kohonen package in case that matters.


Any help you can provide will be greatly appreciated!

- Brock




More information about the R-help mailing list