scales
scales copied to clipboard
Add `style_positive` and `style_negative` to other continuous labelers
I most often work with numbers that are changes in percentages (e.g., -2%, +5%). I mostly use label_percent() for this. However, I'd like to be able to use the style_positive and style_negative arguments from label_number() to format with proper plus and minus signs. Would it be possible to add these arguments to other continuous labelers (especially label_percent())?
library(scales)
demo_continuous(c(-50,50), labels = label_percent(scale = 1, style_positive = "plus", style_negative = "minus") )
hope this help
Ah, so the issue is just that they aren't documented
@bwiernik i've proposed a revision that addresses this, by changing where ... points to (namely, label_numeric, which includes the style_(positive|negative) documentation). is that a sufficient change?
That should work