title: label author: Daniel Jones part: Geometry order: 1006 ...
Label positions on the plot frame.
This geometry attemps to optimize label positioning so that labels do not overlap, and hides any that would overlap.
x
: X-axis position.y
: Y-axis position.label
: Text to render.
Geom.label(;hide_overlaps=true)
hide_overlaps
: If true, labels that would otherwise overlap another label or be drawn outside the plot panel are hidden. (default: true)
using RDatasets
using Gadfly
Gadfly.prepare_display()
Gadfly.set_default_plot_size(14cm, 10cm)
plot(dataset("ggplot2", "mpg"), x="Cty", y="Hwy", label="Model", Geom.point, Geom.label)
plot(dataset("MASS", "mammals"), x="Body", y="Brain", label=1,
Scale.x_log10, Scale.y_log10, Geom.point, Geom.label)