This pull request adds an option for smart label placement using the adjustText package. Currently labels are only placed using an offset but that can cause labels to overlap:
The adjust_text function from adjustText uses an iterative adjustment for label positions to minimize overlaps.
In this example the adjust_text function is relatively slow (<1min) but in problems with fewer points and shorter label strings it is much faster
This does create an extra dependency but the adjustText package is really small and we already support all it's dependencies.
This pull request adds an option for smart label placement using the adjustText package. Currently labels are only placed using an offset but that can cause labels to overlap: The
adjust_text
function from adjustText uses an iterative adjustment for label positions to minimize overlaps. In this example theadjust_text
function is relatively slow (<1min) but in problems with fewer points and shorter label strings it is much fasterThis does create an extra dependency but the adjustText package is really small and we already support all it's dependencies.