Author image Ka-Wai Mak
and 1 contributors

NAME

Chart::Gnuplot::Pie - Plot pie chart using Gnuplot on the fly

SYNOPSIS

    use Chart::Gnuplot::Pie;

    # Create the pie chart object
    my $chart = Chart::Gnuplot::Pie->new(
        output => "pie.png",
        title  => "Sample Pie",
        ....
    );

    # Data set
    my $dataSet = Chart::Gnuplot::Pie::DataSet->new(
        data => [
            ['Item 1', 7500],
            ['Item 2', 3500],
            ['Item 3', 2000],
            ['Item 4', 4500],
        ],
        ....
    );

    # Plot a 2D pie chart
    $chart->plot2d($dataSet);

    #################################################

    # Plot a 3D pie chart
    $chart->plot3d($dataSet);

DESCRIPTION

This module provides an interface for plotting pie charts using Gnuplot. Gnuplot does not have built-in command for pie chart. This module draws the pie charts using the parametric function plotting feature of Gnuplot, an idea from Gnuplotter.

Chart::Gnuplot::Pie is a child class of Chart::Gnuplot. As a result, what you may do on a Chart::Gnuplot object basically works on a Chart::Gnuplot::Pie object too, with a few exceptions. Similarly, Chart::Gnuplot::Pie::DataSet is a child class of Chart::Gnuplot::DataSet.

It should be noted that this module is preliminary. Not many pie charting options are provided in the current version. Besides, backward compatibility may not be guaranteed in later versions.

REQUIREMENT

Chart::Gnuplot

Gnuplot http://www.gnuplot.info

ImageMagick http://www.imagemagick.org (for full feature)

SEE ALSO

Chart::Gnuplot

Gnuplot tricks: http://gnuplot-tricks.blogspot.com

AUTHOR

Ka-Wai Mak <kwmak@cpan.org>

COPYRIGHT

Copyright (c) 2009 Ka-Wai Mak. All rights reserved.

LICENSE

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