

plot {base}                                  R Documentation

_G_e_n_e_r_i_c _X_-_Y _P_l_o_t_t_i_n_g

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

     Generic function for plotting of R objects.  For more
     details about the graphical parameter arguments, see
     `par'.

_U_s_a_g_e_:

     plot(x, ...)
     plot(x, y, xlim=range(x), ylim=range(y), type="p",
             main, xlab, ylab, ...)
     plot(y ~ x, ...)

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

       x: the coordinates of points in the plot. Alterna-
          tively, a single plotting structure or any R
          object with a `plot' method can be provided.

       y: the y coordinates of points in the plot, optional
          if `x' is an appropriate structure.

xlim, ylim: the ranges to be encompassed by the x and y
          axes.

    type: what type of plot should be drawn. Possible types
          are

             * `"p"' for points,

             * `"l"' for lines,

             * `"b"' for both,

             * `"o"' for both ``overplotted'',

             * `"h"' for ``histogram'' like vertical lines,

             * `"s"' for steps,

             * `"S"' for other steps,

             * `"n"' for no plotting.

    main: an overall title for the plot.

    xlab: a title for the x axis.

    ylab: a title for the y axis.

     ...: graphical parameters can be given as arguments to
          `plot'.

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

     For simple scatter plots, `plot.default' will be used.
     However, there are `plot' methods for many R objects,
     including `function's, `data.frame's, `density'
     objects, etc.  Use `methods(plot)' and the documenta-
     tion for these.

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

     `plot.default', `plot.formula' and other methods;
     `points', `lines', `par'.

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

     data(cars)
     plot(cars)
     lines(lowess(cars))

     plot(sin, -pi, 2*pi)

     ## Discrete Distribution Plot:
     plot(table(rpois(100,5)), type = "h", col = "red", lwd=10,
          main="rpois(100,lambda=5)")

