superbarplot             package:UsingR             R Documentation

_s_u_p_e_r _s_e_g_m_e_n_t_e_d _b_a_r_p_l_o_t

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

     Plot a barplot, with bars nested and ranging from a max to a
     minimum value. A similar graphic is used on the weather page of
     the _New York Times_.

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

     superbarplot(x, names = 1:dim(x)[2], names.height = NULL,
       col = gray(seq(0.8, 0.5, length = dim(x)[1]/2)),...
     )

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

       x: A matrix with each pair of rows representing a min and max
          for the bar.

   names: Place a name in each bar. 

names.height: Where the names should go 

     col: What colors to use for the bars. There should be half as many
          specified as rows of 'x' 

     ...: passed to 'plot'. 

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

     A similar graphic on the weather page of the _New York Times_
     shows bars for record highs and lows, normal highs and lows and
     actual (or predicted) highs or lows for 10 days of weather. This
     graphic succintly and elegantly displays a wealth of information.
     Intended as an illustration of the 'polygon' function.

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

     Returns a plot, but no other values.

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

     John Verzani

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

     The  weather page of the _New York Times_

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

     'squareplot'

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

     record.high=c(95,95,93,96,98,96,97,96,95,97)
     record.low= c(49,47,48,51,49,48,52,51,49,52)
     normal.high=c(78,78,78,79,79,79,79,80,80,80)
     normal.low= c(62,62,62,63,63,63,64,64,64,64)
     actual.high=c(80,78,80,68,83,83,73,75,77,81)
     actual.low =c(62,65,66,58,69,63,59,58,59,60)
     x=rbind(record.low,record.high,normal.low,normal.high,actual.low,actual.high)
     the.names=c("S","M","T","W","T","F","S")[c(3:7,1:5)]
     superbarplot(x,names=the.names)

