plot                  package: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. Alternatively, 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 documentation 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)")

