NAME

Chart::GGPlot::Util::Scales - R 'scales' package functions used by Chart::GGPlot

VERSION

version 0.0011

FUNCTIONS

censor

censor($p, $range=pdl([0,1]), $only_finite=true)

Censor any values outside of range.

discard

discar($p, $range=pdl([0,1]))

Discard any values outside of range.

zero_range

zero_range($range, $tol=1000*machine_epsilon)

Determine if range is close to zero, with a specified tolerance.

squish

squish($p, $range=pdl([0,1]), $only_finite=true)

Squish values into range.

hue_pal

hue_pal($h=pdl([0, 360]), $c=100, $l=65, $h_start=0, $direction=1)

log_breaks

log_breaks($base=10, $n=5)

pretty

Compute a sequence of about n+1 equally spaced 'round' values which cover the range of the values in x. The values are chosen so that they are 1, 2 or 5 times a power of 10.

pretty_breaks

Pretty breaks. Uses default break algorithm as implemented in pretty().

rgb255_to_csshex

rgb255_to_csshex($r, $g, $b)

You must make sure the arguments are beteen [0, 255] yourself.

rgb_to_csshex

rgb_to_csshex($r, $g, $b)

Similar as rgb255_to_csshex() but the arguments should be between [0, 1]. This function would process arguments not within [0, 1].

csshex_to_rgb255

csshex_to_rgb255($color_hex)

colorname_to_csshex

colorname_to_csshex($color_name)

AUTHOR

Stephan Loyd <sloyd@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019-2020 by Stephan Loyd.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.