eplot                  package:emu                  R Documentation

_P_l_o_t _e_l_l_i_p_s_e_s _f_o_r _t_w_o-_d_i_m_e_n_s_i_o_n_a_l _d_a_t_a

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

     The function plots ellipses for different categories from
     two-dimensional data.

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

     eplot (x, labs, chars, formant = FALSE, scaling = "linear", 
         prob = 0.95, nsdev = NULL, dopoints = FALSE, doellipse = TRUE, 
         centroid = FALSE, axes = TRUE, xlim, ylim, col = TRUE, lty = FALSE, 
         lwd = NULL, ...)

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

       x: A two-columned matrix of data

    labs: An optional vector of labels, parallel to 'data' 

   chars: An optional  vector of labels, parallel to 'data'. If this
          argument is specified these labels will be plotted rather
          than the labels in 'labs'. 

 formant: If TRUE) then the data is negated and the axes are switched
          so that, for formant data, the plot is made with decreasing
          F2 on the x-axis and decreasing F1 on the y-axis.  

 scaling: Either "mel" or "bark" for mel or bark scaling of the data

    prob: A single numeric vector greater than zero and less than 1
          representing the confidence interval of the ellipse contours.
          Defaults to 0.95

   nsdev: Defines the length of the major and minor axes of the
          ellipses in terms of the standard deviation of the data and
          overrides the prob argument.

dopoints: If TRUE) character labels (from 'labs' or 'chars') are
          plotted for each data point

doellipse: If TRUE, ellipses are drawn on the plot. If FALSE, no
          ellipses are drawn and, if 'dopoints' is also FALSE,
          'centroids' is set to T

centroid: One label for each ellipse is drawn

    axes: If TRUE axes are drawn on the plot.  

    xlim: A vector of two numeric values  giving the range of the
          x-axis. 

    ylim: A vector of two numeric values  giving the range of the
          y-axis. 

     col: If colour is TRUE) the ellipses and labels will be plotted in
          different colours 

     lty: If linetype is TRUE) the ellipses will be plotted with
          different linetypes.  This is useful for plots that will be
          printed.

     lwd: A code passed to the lwd argument in plotting functions.
          'lwd' can be either a single element numeric vector, or its
          length must be equal to the number of unique types in labs.
          For example, if lwd=3 and if labs = c("a", "b", "a", "c"),
          then the output is c(3, 3, 3, 3). Alternatively, if lwd =
          c(2,3,1), then the output is c(2, 3, 2, 1) for the same
          example. The default is NULL in which case all lines are
          drawn with lwd=1 

     ...: graphical options par

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

     NULL

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

     Jonathan Harrington jmh@ipds.uni-kiel.de, Steve Cassidy, Gordon
     Watson

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

     'dcut'

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

         data(vowlax)
        data <- cbind(vowlax.df$F1,vowlax.df$F2)
        phonetic = vowlax.l
        word = vowlax.word

        eplot(data, phonetic)
         
       
        eplot(data, phonetic, form=TRUE, main="F1 x F2 plane", centroid=TRUE)
        eplot(data, phonetic, form=TRUE, main="F1 x F2 plane", dopoints=TRUE)
        eplot(data, phonetic, form=TRUE, main="F1 x F2 plane in Bark", dopoints=TRUE, scaling="bark")
        eplot(data, phonetic, form=TRUE, main="F1 x F2 plane in Bark b/w with linetype", col=FALSE, lty=TRUE, dopoints=TRUE, scaling="bark") 
        eplot(data, phonetic, form=TRUE, main="F1 x F2 plane", doellipse=FALSE, dopoints=TRUE)
        eplot(data, phonetic, form=TRUE, dopoints=TRUE, prob=0.5, main="F1 x F2 plane, 50% confidence intervals")
        eplot(data, phonetic, form=TRUE, dopoints=TRUE, nsdev=2, main="F1 x F2 plane, 2 standard deviations")
        

        temp <- phonetic %in% c("a", "O")
        eplot(data[temp,], phonetic[temp], form=TRUE,  main="F1 x F2 [A] and [O] only", centroid=TRUE)
        

        temp <- phonetic=="O"
        eplot(data[temp,], phonetic[temp], word[temp], form=TRUE, dopoints=TRUE, main="[O] only showing word labels")  
           
        

