PlotUtilities           package:fUtilities           R Documentation

_E_x_p_l_o_r_a_t_i_v_e _D_a_t_a _A_n_a_l_y_s_i_s

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

     A collection and description of functions for plotting with
     emphasis on interactive plots. 

     The plot utility functions are:

       'interactivePlot'  a framework for interactive plot displays,
       'gridVector'       creates from two vectors x and y all grid points.

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

     interactivePlot(x, choices = paste("Plot", 1:9), 
         plotFUN = paste("plot.", 1:9, sep = ""), which = "all", ...)
     gridVector(x, y)

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

 choices: [interactivePlot] - 
           a vector of character strings for the choice menu. By
          Default '"Plot 1"' ... '"Plot 9"' allowing for 9 plots at
          maximum. 

 plotFUN: [interactivePlot] - 
           a vector of character strings naming the plot functions. By
          Default '"plot.1"' ... '"plot.9"' allowing for 9 plots at
          maximum. 

   which: plot selection, which graph should be displayed? If '"which"'
          is a character string named "ask" the user is interactively
          asked  which to plot, if a logical vector of length 'N',
          those plots  which are set 'TRUE' are displayed, if a
          character string named '"all"' all plots are displayed. 

    x, y: [gridVector] - 
           two numeric vector which span the two dimensional grid.  

     ...: additional arguments passed to the FUN or plot function. 

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

     Diethelm Wuertz for this R port.

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

     ## Test Plot Function:
        testPlot = function(x, which = "all", ...) {   
          # Plot Function and Addons:
          plot.1 <<- function(x, ...) plot(x, ...)      
          plot.2 <<- function(x, ...) acf(x, ...)
          plot.3 <<- function(x, ...) hist(x, ...)      
          plot.4 <<- function(x, ...) qqnorm(x, ...)
          # Plot:
          interactivePlot(x,
            choices = c("Series Plot", "ACF", "Histogram", "QQ Plot"),
            plotFUN = c("plot.1", "plot.2", "plot.3", "plot.4"),
            which = which, ...)       
          # Return Value:
          invisible()
        }  
        # Plot:
        par(mfrow = c(2, 2), cex = 0.7)
        testPlot(rnorm(500))
           
        # Try:
        # par(mfrow = c(1,1))
        # testPlot(rnorm(500), which = "ask")
             
     ## Grid Vector - 
        gridVector(1:5, 1:5)

