The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Chart::GGPlot::Built - A processed ggplot that can be rendered

VERSION

version 0.0007

DESCRIPTION

This class represents a processed Chart::GGPlot::Plot object that can be rendered. A Chart::GGPlot::Backend consumer generates an object of this class as an intermediate form during rendering a Chart::GGPlot::Plot object.

ATTRIBUTES

data

An arrayref of data frames, each for a layer's processed data that would later be used for rendering the plot.

prestats_data

An arrayref of data frames, each for a layer's processed data before stats are applied. Some geom implementation of some graphics backends, like Plotly's boxplot, may need this data.

layout

A Chart::GGPlot::Layout object, which contains info about axis limits, breaks, etc.

plot

The Chart::GGPlot::Plot object from which the Chart::GGPlot::Built object is created.

METHODS

layer_data

    layer_data($i=0)

Helper function that returns the data associated with a given layer. $i is the index of layer.

    my $data = $ggplot->layer_data(0);

layer_prestats_data

    layer_prestats_data($i=0)

Similar to the layer_data method but is for prestats_data.

layer_scales

    layer_scales($i=0, $j=0)

Helper function that returns the scales associated with a given layer. Returns a hashref of x and y scales for the layer at row $i and column $j.

SEE ALSO

Chart::GGPlot::Plot, Chart::GGPlot::Backend

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.