Skip to content

scales 1.0.0

Compare
Choose a tag to compare
@hadley hadley released this 09 Aug 12:39

New Features

Formatters

  • comma_format(), percent_format() and unit_format() gain new arguments:
    accuracy, scale, prefix, suffix, decimal.mark, big.mark
    (@larmarange, #146).

  • dollar_format() gains new arguments: accuracy, scale, decimal.mark,
    trim (@larmarange, #148).

  • New number_bytes_format() and number_bytes() format numeric vectors into byte
    measurements (@hrbrmstr, @dpseidel).

  • New number_format() provides a generic formatter for numbers (@larmarange, #142).

  • New pvalue_format() formats p-values (@larmarange, #145).

  • ordinal_format() gains new arguments: prefix, suffix, big.mark, rules;
    rules for French and Spanish are also provided (@larmarange, #149).

  • scientific_format() gains new arguments: scale, prefix, suffix, decimal.mark,
    trim (@larmarange, #147).

  • New time_format() formats POSIXt and hms objects (@dpseidel, #88).

Transformations & breaks

  • boxcox_trans() is now invertible for x >= 0 and requires positive values.
    A new argument offset allows specification of both type-1 and type-2 Box-Cox
    transformations (@dpseidel, #103).

  • log_breaks() returns integer multiples of integer powers of base when finer
    breaks are needed (@ThierryO, #117).

  • New function modulus_trans() implements the modulus transformation for positive
    and negative values (@dpseidel).

  • New pseudo_log_trans() for transforming numerics into a signed logarithmic scale
    with a smooth transition to a linear scale around 0 (@lepennec, #106).

Minor bug fixes and improvements

  • scales functions now work as expected when it is used inside a for loop. In previous
    package versions if a scales function was used with variable custom parameters
    inside a for loop, some of the parameters were not evaluated until the end
    of the loop, due to how R lazy evaluation works (@zeehio, #81).

  • colour_ramp() now uses alpha = TRUE by default (@clauswilke, #108).

  • date_breaks() now supports subsecond intervals (@dpseidel, #85).

  • Removes dichromat and plyr dependencies. dichromat is now suggested
    (@dpseidel, #118).

  • expand_range() arguments mul and add now affect scales with a range of 0
    (@dpseidel,
    ggplot2-2281).

  • extended_breaks() now allows user specification of the labeling::extended()
    argument only.loose to permit more flexible breaks specification
    (@dpseidel, #99).

  • New rescale() and rescale_mid() methods support dist objects (@zeehio, #105).

  • rescale_mid() now properly handles NAs (@foo-bar-baz-qux, #104).