Gadfly.jl
Gadfly.jl copied to clipboard
label overlaps are not hidden
Gadfly.plot(Gadfly.layer([1 2 "aaaa";1 2 "bbbb"; 1 2 "cccccc"; 1 2 "ddddddd"], x=Gadfly.Col.value(1), y=Gadfly.Col.value(2), label=Gadfly.Col.value(3), color=Gadfly.Col.value(3), Gadfly.Geom.point, Gadfly.Geom.label(; position=:dynamic, hide_overlaps=true), Gadfly.Theme(highlight_width=0Gadfly.pt, point_label_font_size=18Gadfly.pt)))
Geom.label(hide_overlaps=true) (the default) generally works, and an example is the mammals plot in the Tutorial. The algorithm behind hide_overlaps fails in your case, because it's finding a local minima.
If you really want to plot labels around a single point, a better way might be:
plot(x=[1], y=[2], label=["aaaa cccccc\nbbbb dddddd"],
Geom.point, Geom.label(position=:centered),
Theme(point_label_font_size=18pt))
