violinplot              package:Simple              R Documentation

_P_l_o_t_s _v_i_o_l_i_n_p_l_o_t_s _i_n_s_t_e_a_d _o_f _b_o_x_p_l_o_t_s

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

     This function serves the same utility as side-by-side boxplots,
     only it provides more detail about the different distribution. It
     plots violinplots instead of boxplots. That is, instead of a box,
     it uses the density function to plot the density. For skewed
     distributions, the results look like "violins". Hence the name.

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

     violinplot(x, ...)

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

       x: Either a sequence of variable names, or a data frame, or a
          model formula

     ...: You can pass arguments to polygon with this. Notably, you 
          can set the color to red with col='red', and a border color
          with border='blue'

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

     Returns a plot.

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

     John Verzani

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

     This is really the boxplot function from R/base with some minor
     adjustments

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

     boxplot, densityplot

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

     ## make a "violin"
     x <- rnorm(100) ;x[101:150] <- rnorm(50,5)
     violinplot(x,col="brown")
     f<-factor(rep(1:5,30))
     ## make a quintet. Note also choice of bandwidth
     violinplot(x~f,col="brown",bw="SJ")

