colorbrewer             package:epitools             R Documentation

_D_i_s_p_l_a_y _a_n_d _c_r_e_a_t_e _C_o_l_o_r_B_r_e_w_e_r _p_a_l_e_t_t_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Display and create ColorBrewer palettes based on Cindy Brewer's
     website at www.colorbrewer.org.

_U_s_a_g_e:

     colorbrewer.display(nclass = 5,
                         type = c("qualitative", "sequential", "diverging"),
                         col.bg = "white")
     colorbrewer.palette(nclass = 5,
                         type = c("qualitative", "sequential", "diverging"),
                         palette = letters[1:18])
     colorbrewer.data()

_A_r_g_u_m_e_n_t_s:

  nclass: number of classes or categories to be compared graphically

    type: select either 'qualitative' (default), 'sequential', or
          'diverging'

  col.bg: set background color (default is white)

 palette: select palette (letter) from displayed plot

_D_e_t_a_i_l_s:

     These R functions includes color specifications and designs
     developed by Cynthia Brewer (<URL: http://www.colorbrewer.org>).
     For more details on color selection please visit this excellent
     site.

     First, select the number of classes or categories to be compared
     ('nclass'). Second, select the 'type' of comparison (qualitative 
     vs. sequential vs. diverging). Third, use 'colorbrewer.display' to
     display the available ColorBrewer palette for a given type and
     number of classes. Fourth, using the 'colorbrewer.palette'
     function, create a color palette for use in R graphics functions
     (e.g, col = mypal, where mypal was created from
     'colorbrewer.palette').

     Note that you can change the background color.

     ColorBrewer is Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
     and The Pennsylvania State University. All rights reserved. The
     ColorBrewer palettes have been included in this R package with
     permission of the copyright holder. Copyright and license
     information at <URL: http://www.colorbrewer.org>.

     These functions for 'epitools' were created to make the
     ColorBrewer palettes readily  available to 'epitools' users, and
     to have the same 3-step selection order as the <URL:
     www.colorbrewer.org> site. A more visually appealing display of
     the ColorBrewer schemes is available in the 'RColorBrewer'
     package.

_V_a_l_u_e:

     'colorbrewer.display' displays ColorBrewer selection and invisibly
     returns data that corresponds to graphical display

     'colorbrewer.palette' returns 'rgb' vector palette

_N_o_t_e:

     Visit <URL: http://www.epitools.net> for the latest.

_A_u_t_h_o_r(_s):

     Tomas Aragon, aragon@berkeley.edu, <URL: http://www.medepi.com>

_R_e_f_e_r_e_n_c_e_s:

     ColorBrewer, by Cynthia Brewer, Pennsylvanis State University,
     cbrewer@psu.edu, <URL: http://www.colorbrewer.org> accessed on
     2004-11-26

_S_e_e _A_l_s_o:

     'epitools' package: 'colors.plot'

     'RColorBrewer' package: 'brewer.pal', 'display.brewer.pal',
     'display.brewer.all' 

     'colors', 'rgb', 'palette'

_E_x_a_m_p_l_e_s:

     ##display available palettes for given nclass and type
     colorbrewer.display(9, "sequential")

     ##change background to blue
     colorbrewer.display(9, "sequential", "blue")

     ##display available palettes for given nclass and type,
     ##but also display RGB numbers to create your own palette
     cbrewer.9s <- colorbrewer.display(9, "sequential")
     cbrewer.9s

     ##Display and use ColorBrewer palette
     ##first, display and choose palette (letter)
     colorbrewer.palette(10, "q")

     ##second, extract and use ColorBrewer palette
     mycolors <- colorbrewer.palette(nclass = 10, type = "q", palette = "b")
     xx <- 1:10
     yy <- outer(1:10, 1:10, "*")
     matplot(xx,yy, type="l", col = mycolors, lty = 1, lwd = 4)

