title: line author: Daniel Jones part: Geometry order: 1007 ...
x
: X-axis position.y
: Y-axis position.color
(optional): Group categorically by color.
preserve_order
: Default behavior forGeom.line
is to draw lines between points in order along the x-axis. If this option is true, lines will be drawn between points in the order they appear in the data.
using RDatasets
using Gadfly
Gadfly.prepare_display()
Gadfly.set_default_plot_size(14cm, 8cm)
plot(data("lattice", "melanoma"), x="year", y="incidence", Geom.line)
plot(data("Zelig", "approval"), x="month", y="approve", color="year", Geom.line)