multplot                 package:far                 R Documentation

_M_u_l_t_i_v_a_r_i_a_t_e _p_l_o_t_s

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

     Multivariate plots of Functional Data (more precisely 'fdata'
     objects).

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

     multplot(object, ...)

     multplot.fdata (object, date = 1, xval = NULL, name = NULL, legend = FALSE,
         yleg, xlab = NULL, ylab = NULL, main = NULL, whole = FALSE, ...)

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

  object: An 'fdata' object for which a multplot is desired. 

    date: String vector. List of the dates to work with. 

    xval: Numerical vector. Values of the axis x. 

    name: String vector. The set of variables to plot. 

  legend: Boolean. Plot a legend ? 

    yleg: Numeric. Where to put the legend box (y value). 

    xlab: String. Title of the axis x. 

    ylab: String. Title of the axis y. 

    main: String. Title of the plot. 

   whole: Boolean. A global plot (TRUE) or a plot by day (FALSE) 

     ...: Additional arguments. 

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

     This function facilitate the plotting of 'fdata' objects. It is
     dedicated to multivariate plots, please take a look at
     'plot.fdata' if you need univariate plots in one graphic.

     The default behaviour is to produce one plot containing all the
     variables of the observation called "1".

     If you want less variables, use the 'name' argument. If you need
     more observations, use the 'date' argument. When provided, the
     'xval' argument allow you to change the labels of the x-axis.

     It is also possible to plot the complete series on the same plot
     using the 'whole' argument.

     Moreover a legend facility is provided using the 'legend' and
     'yleg' arguments.

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

     J. Damon

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

     'fdata', 'plot.fdata'.

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

       # Simulation of a FARX process
       data1 <- simul.farx(m=10,n=100,base=base.simul.far(20,5),
                     base.exo=base.simul.far(20,5),
                     d.a=matrix(c(0.5,0),nrow=1,ncol=2),
                     alpha.conj=matrix(c(0.2,0),nrow=1,ncol=2),
                     d.rho=diag(c(0.45,0.90,0.34,0.45)),
                     alpha=diag(c(0.5,0.23,0.018)),
                     d.rho.exo=diag(c(0.45,0.90,0.34,0.45)),
                     cst1=0.0)

      # 2 variables : X et Z
      # number of points per curve : 10
      # number of curves : 100
      # corresponding dates
      date.fdata(data1)

      multplot(data1) # plot the date "1" of the variables "X" and "Z"
      multplot(data1,legend=TRUE) # Same thing with a legend
      multplot(data1,legend=TRUE,yleg=-0.5) # same thing with a legend misplaced
      multplot(data1,main="day 1",legend=TRUE,xlab="hour",
               ylab="object of study")

      par(mfrow=c(1,3))
      multplot(data1,date=c("3","4","5")) # days "3", "4" and "5" are plotted
      par(mfrow=c(1,1))

      # to plot the whole series, we used whole = TRUE
      # but we have to give the x values

      multplot(data1,xval=seq(from=0,to=99.9,by=0.1),whole=TRUE)

      # to plot a subset of the series,
      # it is recommended to create a subset object with select.fdata
      data2 <- select.fdata(data1,date=c("4","5","6"))
      multplot(data2,xval=seq(from=4,to=6.9,by=0.1),whole=TRUE)

