This help topic is for R version 0.60. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/plot.html
plot {base}R Documentation

X-Y Plotting

Description

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

A longer description will go here eventually.

Usage

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

Arguments

x, y

the coordinates of points in the plot. Alternatively, a single plotting structure can be provided.

xlim, ylim

the ranges to be encompased 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, and

  • "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.

See Also

plot.default, points, lines, par.

Examples

plot(cars)
lines(lowess(cars))

[Package base version 0.60 ]