Skip to content

Accept numbers in addition to units to *.padding, *.length #79

Closed
@seaaan

Description

Instead of writing

geom_label_repel(box.padding = unit(0.25, "lines"),
  label.padding = unit(0.25, "lines"), point.padding = unit(1e-06, "lines"),
  label.r = unit(0.15, "lines"),  min.segment.length = unit(0.5, "lines"))

it would be nice to write

geom_label_repel(box.padding = 0.25, label.padding = 0.25, 
  point.padding = 1e-06, label.r = 0.15, min.segment.length = 0.5)

and have it automatically convert those arguments to line units behind the scenes. This would be a useful shorthand, but it should also still accept units in case someone wants to use a non-line unit.

I'd be happy to implement this and submit a pull request if you think it's a good idea. Thanks for this package, I love it!

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions