hplot                  package:Rlab                  R Documentation

_H_i_s_t_o_g_r_a_m _a_l_l_o_w_i_n_g _f_o_r_c_e_d _n_u_m_b_e_r _o_f _b_i_n_s

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

     Plots a histogram in the same manner as 'hist', but with the
     following changes: 'freq = FALSE' by default, to print the density
     instead of the frequency and 'nclass' specifies the exact number
     of bins to use (calculated by equally seperating the distance
     between the min and max value to be graphed)

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

     hplot(x, breaks = "Sturges", freq = FALSE, nclass = NULL, col = 8, ...) 

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

       x: a vector of values for which the histogram is desired. 

  breaks: see 'hist' for the use of this option.  If both 'breaks' and
          'nclass' are specified, then 'breaks' is ignored. 

    freq: logical; if 'FALSE' (default), relative frequencies
          ("probabilities"), component 'density', are plotted; if
          'TRUE', the histogram graphic is a representation of
          frequencies, the 'counts' component of the result. 

  nclass: numeric (integer); the number of bins for the histogram. If
          both 'breaks' and 'nclass' are specified, then 'breaks' is
          ignored. 

     col: color of the histogram bars (8, the default, is grey). 

     ...: Other arguments controlling the plot. Many graphical plotting
          arguments may be used. See help on 'hist' or 'plot' or 'par'
          for more information. 

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

     hist, plot

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

     # Create and graph some Normal data
     set.seed(100)
     set.panel(3,1)
     z<- rnorm(100)
     hplot(z, nclass=5, main="Standard Normal", xlim=c(-10,10), ylim=c(0,.4))
     z<- rnorm(100, sd=2)
     hplot(z, nclass=10, main="Std Dev of 2", xlim=c(-10,10), ylim=c(0,.4))
     z<- rnorm(100, sd=3)
     hplot(z, nclass=15, main="Std Dev of 3", xlim=c(-10,10), ylim=c(0,.4))

