NAME

Chart::GGPlot::Layer - Chart::GGPlot layer

VERSION

version 0.0000_02

DESCRIPTION

A layer is a combination of data, stat and geom with a potential position adjustment. Usually layers are created using `geom_*` or `stat_*` calls but it can also be created directly using this class.

ATTRIBUTES

geom

The geometric object to display the data.

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 adjust function.

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, e.g. [borders()].

params

Additional parameters to the `geom` and `stat`.

show_legend

Should this layer be included in the legends?

  • 'auto', includes if any aesthetics are mapped.

  • 'never', never includes.

  • 'always', always includes.

  • A Chart::GGPlot::Aes object, to finely select the aesthetics to display.

METHODS

string()

layer_data($plot_data)

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.