# Back to the default graphical parametersĪn alternative is to set the legend below (or above) the plot following the same approach we followed before but increasing the bottom or upper margins. Input and display read files with labels in first row read.table(filename,headerTRUE) read a tab or space delimited file read. We can take a look at them all with the colors () function, or simply check this R color pdf. Xpd = TRUE) # Needed to put the legend outside the plot See the R-reference card by Tom Short for a much more complete list. Accent, Dark2, Paired, Pastel1, Pastel2, Set1, Set2, Set3. Inset = c(-0.35, 0), # You will need to fine-tune the first The function hcl.colors provides a broad range of sequential color palettes that are suitable for displaying ordered data, with n giving the number of colors. BrBG, PiYG, PRGn, PuOr, RdBu, RdGy, RdYlBu, RdYlGn, Spectral Qualitative. For that purpose you will need to increase the margins of the plot, set the legend, use xpd = TRUE and fine tune the values of the inset argument. I'd like to be able to call those colors via a name rather than by the HEX or RGB because I don't remember them. require(graphics) A Color Wheel pie(rep(1,12), colrainbow(12)). In some scenarios you will need to set the legend outside of the plot because it doesn’t fit inside. 1A73BA (R: 26 G: 115 B: 186) - this is a blue FFDB43 (R:255 G:219 B:67) - this is a yellow B54B05 (R:181 G:75 B:5) - this is an orange My company's initials are AT. colors, palette, hsv, hcl, rgb, gray and col2rgb for translating to RGB numbers.
0 Comments
Leave a Reply. |