Geom.abline

For each number in yintercept, draw the lines y = xslope * x + yintercept across the plot canvas. Similarly, for each number in xintercept, draw the lines x = yslope * y + xintercept across the plot canvas.

Aesthetics

Arguments

Examples

plot(dataset("ggplot2", "mpg"), x="Cty", y="Hwy", label="Model", Geom.point, Geom.label,
    yintercept=[0], xslope=[1], Geom.abline(color="red"),
    Guide.annotation(compose(context(), text(6,4, "y=x", hleft, vtop), fill(colorant"red"))))
Cty 0 10 20 30 40 a4 a4 a4 a4 a4 a4 a4 quattro a4 quattro a4 quattro a4 quattro a4 quattro a4 quattro a4 quattro a4 quattro a6 quattro a6 quattro a6 quattro c1500 suburban 2wd c1500 suburban 2wd c1500 suburban 2wd c1500 suburban 2wd c1500 suburban 2wd corvette corvette corvette corvette corvette k1500 tahoe 4wd k1500 tahoe 4wd k1500 tahoe 4wd k1500 tahoe 4wd malibu malibu malibu malibu malibu caravan 2wd caravan 2wd caravan 2wd caravan 2wd caravan 2wd caravan 2wd caravan 2wd caravan 2wd caravan 2wd caravan 2wd caravan 2wd dakota pickup 4wd dakota pickup 4wd dakota pickup 4wd dakota pickup 4wd dakota pickup 4wd dakota pickup 4wd dakota pickup 4wd dakota pickup 4wd dakota pickup 4wd durango 4wd durango 4wd durango 4wd durango 4wd durango 4wd durango 4wd durango 4wd ram 1500 pickup 4wd ram 1500 pickup 4wd ram 1500 pickup 4wd ram 1500 pickup 4wd ram 1500 pickup 4wd ram 1500 pickup 4wd ram 1500 pickup 4wd ram 1500 pickup 4wd ram 1500 pickup 4wd ram 1500 pickup 4wd expedition 2wd expedition 2wd expedition 2wd explorer 4wd explorer 4wd explorer 4wd explorer 4wd explorer 4wd explorer 4wd f150 pickup 4wd f150 pickup 4wd f150 pickup 4wd f150 pickup 4wd f150 pickup 4wd f150 pickup 4wd f150 pickup 4wd mustang mustang mustang mustang mustang mustang mustang mustang mustang civic civic civic civic civic sonata sonata sonata sonata sonata sonata sonata tiburon tiburon tiburon tiburon tiburon tiburon tiburon grand cherokee 4wd grand cherokee 4wd grand cherokee 4wd grand cherokee 4wd grand cherokee 4wd grand cherokee 4wd grand cherokee 4wd grand cherokee 4wd range rover range rover range rover range rover navigator 2wd navigator 2wd navigator 2wd mountaineer 4wd mountaineer 4wd mountaineer 4wd mountaineer 4wd altima altima altima altima altima altima maxima maxima maxima pathfinder 4wd pathfinder 4wd pathfinder 4wd pathfinder 4wd grand prix grand prix grand prix grand prix forester awd forester awd forester awd forester awd forester awd forester awd impreza awd impreza awd impreza awd impreza awd impreza awd impreza awd impreza awd impreza awd 4runner 4wd 4runner 4wd 4runner 4wd 4runner 4wd 4runner 4wd 4runner 4wd camry camry camry camry camry camry camry camry solara camry solara camry solara camry solara camry solara camry solara camry solara corolla corolla corolla corolla land cruiser wagon 4wd land cruiser wagon 4wd toyota tacoma 4wd toyota tacoma 4wd toyota tacoma 4wd toyota tacoma 4wd toyota tacoma 4wd toyota tacoma 4wd toyota tacoma 4wd gti gti gti gti gti jetta jetta jetta jetta jetta jetta jetta jetta new beetle new beetle new beetle new beetle passat passat passat passat passat passat passat a4 civic civic civic civic grand prix corolla jetta new beetle new beetle y=x 0 10 20 30 40 50 Hwy