Skip to content
Prev 246429 / 398502 Next

Adding lines in ggplot2

Dennis:

Can't speak to ggplot2, but your comments regarding lattice are not
quite correct. Many if not all of lattice's basic plot functions are
generic, which means that one has essentially complete latitude to
define plotting methods for arbitrary data structures. For example,
there is an xyplot.ts method for time series -- class ts -- data.

Of course, for most lattice methods, the data do naturally come in a
data frame, and a standard lattice argument is to give a frame from
which to pull the data. But this is not required.

-- Bert