Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 942 Bytes

geom_label.md

File metadata and controls

51 lines (33 loc) · 942 Bytes

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.

Aesthetics

  • x: X-axis position.
  • y: Y-axis position.
  • label: Text to render.

Arguments

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)

Examples

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)