App-GnuplotUtils

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


    *   field_delimiter => *str*

        Supply field delimiter character in dataset file instead of the
        default whitespace(s) or comma(s).

    *   output_file => *filename*

        (No description)

    *   output_format => *str* (default: "png")

        The output format is normally determined from the output filename's
        extension, e.g. "foo.jpg". This option is for when you do not
        specify output filename and want to change the format from the
        default "png".

    *   overwrite => *bool*

        (No description)

    Returns an enveloped result (an array).

    First element ($status_code) is an integer containing HTTP-like status
    code (200 means OK, 4xx caller error, 5xx function error). Second
    element ($reason) is a string containing error message, or something

lib/App/GnuplotUtils.pm  view on Meta::CPAN

_
    args => {
        chart_title => {
            schema => 'str*',
        },
        output_format => {
            description => <<'MARKDOWN',

The output format is normally determined from the output filename's extension,
e.g. `foo.jpg`. This option is for when you do not specify output filename and
want to change the format from the default `png`.

MARKDOWN
            schema => ['str*', in=>[qw/bmp gif jpg png webp
                                       pdf ps svg/]],
            default => 'png',
        },
        output_file => {
            schema => 'filename*',
            cmdline_aliases => {o=>{}},
            tags => ['category:output'],
        },
        overwrite => {
            schema => 'bool*',
            cmdline_aliases => {O=>{}},
            tags => ['category:output'],

lib/App/GnuplotUtils.pm  view on Meta::CPAN

    ],
};
sub xyplot {
    require Chart::Gnuplot;
    require File::Slurper::Dash;
    require File::Temp;
    require Scalar::Util;

    my %args = @_;

    my $output_format = $args{output_format} // 'png';

    my $fieldsep_re = qr/\s*,\s*|\s+/s;
    if (defined $args{delimited}) {
        $fieldsep_re = qr/\Q$args{delimited}\E/;
    }

    my ($outputfilename);
    if (defined $args{output_file}) {
        $outputfilename = $args{output_file};
        if (-f $outputfilename && !$args{overwrite}) {

lib/App/GnuplotUtils.pm  view on Meta::CPAN

Dataset title(s).

=item * B<field_delimiter> => I<str>

Supply field delimiter character in dataset file instead of the default whitespace(s) or comma(s).

=item * B<output_file> => I<filename>

(No description)

=item * B<output_format> => I<str> (default: "png")

The output format is normally determined from the output filename's extension,
e.g. C<foo.jpg>. This option is for when you do not specify output filename and
want to change the format from the default C<png>.

=item * B<overwrite> => I<bool>

(No description)


=back

Returns an enveloped result (an array).

script/xyplot  view on Meta::CPAN

See C<--dataset-title>.

=item B<--field-delimiter>=I<s>, B<-d>

Supply field delimiter character in dataset file instead of the default whitespace(s) or comma(s).

=item B<--output-format>=I<s>

Default value:

 "png"

Valid values:

 ["bmp","gif","jpg","png","webp","pdf","ps","svg"]

The output format is normally determined from the output filename's extension,
e.g. C<foo.jpg>. This option is for when you do not specify output filename and
want to change the format from the default C<png>.


=back

=head2 Output options

=over

=item B<--format>=I<s>



( run in 1.054 second using v1.01-cache-2.11-cpan-df04353d9ac )