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.Geom.path()
isGeom.line(preserve_order=true)
.
using RDatasets
using Gadfly
Gadfly.prepare_display()
Gadfly.set_default_plot_size(14cm, 8cm)
plot(dataset("lattice", "melanoma"), x="Year", y="Incidence", Geom.line)
plot(dataset("Zelig", "approval"), x="Month", y="Approve", color="Year", Geom.line)