NAME

Chart::GGPlot::Stat::Functions - Function interface for stats

VERSION

version 0.0003

DESCRIPTION

FUNCTIONS

stat_bin

stat_bin(:$mapping=undef, :$data=undef,
         :$geom="bar", :$position="stack",
         :$binwidth=undef, :$bins=undef,
         :$center=undef, :$boundary=undef, :$breaks=undef,
         :$pad=false,
         :$na_rm=false, :$show_legend='auto', :$inherit_aes=true,
         %rest)

Arguments:

  • $mapping

    Set of aesthetic mappings created by aes(). If specified and $inherit_aes is true (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping.

  • $data

    The data to be displayed in this layer. If undef, the default, the data is inherited from the plot data as specified in the call to ggplot().

  • $stat

    The statistical transformation to use on the data for this layer, as a string.

  • $position

    Position adjustment, either as a string, or the result of a call to a position adjustment function.

  • $na_rm

    If false, the default, missing values are removed with a warning. If true, missing values are silently removed.

  • $show_legend

    Should this layer be included in the legends? 'auto', the default, includes if any aesthetics are mapped. false never includes, and false always includes.

  • $inherit_aes

    If false, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification.

  • %rest

    Other arguments passed to Chart::GGPlot::Layer->new(). These are often aesthetics, used to set an aesthetic to a fixed value, like color => "red", size => 3. They may also be parameters to the paired geom/stat.

  • $binwidth

    The width of the bins. Can be specified as a numeric value, or a function that calculates width from x. The default is to use $bins bins that cover the range of the data.

  • $bins

    Number of bins. Overridden by $binwidth. Defaults to 30.

    You should always override this $bins or $binwidth, exploring multiple widths to find the best to illustrate the stories in your data.

stat_boxplot

stat_boxplot(:$mapping=undef, :$data=undef,
             :$geom='boxplot', :$position='dodge2',
             :$coef=1.5,
             :$na_rm=false, :$show_legend='auto', :$inherit_aes=true,
             %rest)

Arguments:

  • $mapping

    Set of aesthetic mappings created by aes(). If specified and $inherit_aes is true (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping.

  • $data

    The data to be displayed in this layer. If undef, the default, the data is inherited from the plot data as specified in the call to ggplot().

  • $stat

    The statistical transformation to use on the data for this layer, as a string.

  • $position

    Position adjustment, either as a string, or the result of a call to a position adjustment function.

  • $na_rm

    If false, the default, missing values are removed with a warning. If true, missing values are silently removed.

  • $show_legend

    Should this layer be included in the legends? 'auto', the default, includes if any aesthetics are mapped. false never includes, and false always includes.

  • $inherit_aes

    If false, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification.

  • %rest

    Other arguments passed to Chart::GGPlot::Layer->new(). These are often aesthetics, used to set an aesthetic to a fixed value, like color => "red", size => 3. They may also be parameters to the paired geom/stat.

  • $coef

    Length of the whiskers as multiple of IQR. Defaults to 1.5.

stat_count

stat_count(:$mapping=undef, :$data=undef,
           :$geom='bar', :$position='stack', 
           :$width=undef,
           :$na_rm=false, :$show_legend=undef, :$inherit_aes=true,
           %rest)

Arguments:

  • $mapping

    Set of aesthetic mappings created by aes(). If specified and $inherit_aes is true (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping.

  • $data

    The data to be displayed in this layer. If undef, the default, the data is inherited from the plot data as specified in the call to ggplot().

  • $stat

    The statistical transformation to use on the data for this layer, as a string.

  • $position

    Position adjustment, either as a string, or the result of a call to a position adjustment function.

  • $na_rm

    If false, the default, missing values are removed with a warning. If true, missing values are silently removed.

  • $show_legend

    Should this layer be included in the legends? 'auto', the default, includes if any aesthetics are mapped. false never includes, and false always includes.

  • $inherit_aes

    If false, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification.

  • %rest

    Other arguments passed to Chart::GGPlot::Layer->new(). These are often aesthetics, used to set an aesthetic to a fixed value, like color => "red", size => 3. They may also be parameters to the paired geom/stat.

  • $width

    Bar width. By default, set to 90% of the resolution of the data.

stat_identity

stat_identity(:$mapping=undef, :$data=undef,
              :$geom="point", :$position="identity",
              :$show_legend=undef, :$inherit_aes=true,
              %rest)

Arguments:

  • $mapping

    Set of aesthetic mappings created by aes(). If specified and $inherit_aes is true (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping.

  • $data

    The data to be displayed in this layer. If undef, the default, the data is inherited from the plot data as specified in the call to ggplot().

  • $stat

    The statistical transformation to use on the data for this layer, as a string.

  • $position

    Position adjustment, either as a string, or the result of a call to a position adjustment function.

  • $na_rm

    If false, the default, missing values are removed with a warning. If true, missing values are silently removed.

  • $show_legend

    Should this layer be included in the legends? 'auto', the default, includes if any aesthetics are mapped. false never includes, and false always includes.

  • $inherit_aes

    If false, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification.

  • %rest

    Other arguments passed to Chart::GGPlot::Layer->new(). These are often aesthetics, used to set an aesthetic to a fixed value, like color => "red", size => 3. They may also be parameters to the paired geom/stat.

SEE ALSO

Chart::GGPlot::Stat

AUTHOR

Stephan Loyd <sloyd@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019 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.