NAME

Chart::GGPlot - ggplot2 port in Perl

VERSION

version 0.0002_01

STATUS

At this moment this library is experimental and still under active development (at my after-work time). It's still quite incomplete compared to R's ggplot2 library, but the core features are working.

Besides, it heavily depends on my Alt::Data::Frame::ButMore library, which is also experimental.

SYNOPSIS

use Chart::GGPlot qw(:all);
use Data::Frame::Examples qw(mtcars);

my $plot = ggplot(
    data => mtcars(),
    mapping => aes( x => 'wt', y => 'mpg' )
)->geom_point();

# show in browser
$plot->show;

# export to image file
$plot->save('mtcars.png');

# see "examples" dir of this library's distribution for more examples.

DESCRIPTION

This Chart-GGPlot library is an implementation of ggplot2 in Perl. It's designed to be possible to support multiple plotting backends. And it ships a default backend which uses Chart::Plotly.

This Chart::GGPlot module is the function interface of the Perl Chart-GGPlot library.

Example exported image files:

proportional stacked bar line chart boxplot viridis color scale theme 'minimal'

See the examples dir in the library's distribution for more examples.

FUNCTIONS

ggplot

ggplot(:$data, :$mapping, %rest)

This is same as Chart::GGPlot::Plot->new(...). See Chart::GGPlot::Plot for details.

qplot

qplot(Piddle1D :$x, Piddle1D :$y, Str :$geom='auto',
    :$xlim=undef, :$ylim=undef,
    :$log='', :$title=undef, :$xlab='x', :$ylab='y',
    %rest)

ENVIRONMENT VARIABLES

CHART_GGPLOT_TRACE

A positive integer would enable debug messages.

SEE ALSO

ggplot2

Chart::GGPlot::Plot

Alt::Data::Frame::ButMore

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.