zoom                 package:IDPmisc                 R Documentation

_Z_o_o_m_i_n_g _i_n _a_n_d _o_u_t _i_n _a _2_d-_P_l_o_t

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

     Function to zoom in and out by mouse click in a 2D-plot.

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

     zoom(fun = plot, zoom.col = "red", delay = 3, ...)

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

     fun: 2D-plotting function

zoom.col: Color of clicked points

   delay: Number of sec during which the 2 zooming points are shown on
          the plot before zooming

     ...: Arguments to plotting function

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

     When the clicked points lay within the plot region range, the
     points define the new plotting limits. When the clicked points lay
     in the margin,  the plotting limits will be moved into the
     corresponding direction by 1/3 out of the actual range. There is
     no special sequential order for the zooming points required. The
     zooming function is stopped by right clicking and choosing the
     menu item "stop".

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

     No value returned.

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

     Rene Locher

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

     i <- 1:100
     y <- i*sin(i*(pi/16))
     y <- c(rev(y),y)

     ## comment next line out to run the example
     ## zoom(fun=plot, zoom.col="red", x=1:200, y=y, ty="l", xlab="index")

